本文整理汇总了Java中org.infinispan.manager.DefaultCacheManager.start方法的典型用法代码示例。如果您正苦于以下问题:Java DefaultCacheManager.start方法的具体用法?Java DefaultCacheManager.start怎么用?Java DefaultCacheManager.start使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.infinispan.manager.DefaultCacheManager
的用法示例。
在下文中一共展示了DefaultCacheManager.start方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: startVendorInstance
import org.infinispan.manager.DefaultCacheManager; //导入方法依赖的package包/类
@Override
public void startVendorInstance() throws Exception {
String workerType = get("WORKER_TYPE");
if ("javaclient".equals(workerType)) {
Properties hotrodProperties = new Properties();
hotrodProperties.setProperty("infinispan.client.hotrod.server_list", get("server_list"));
Configuration configuration = new ConfigurationBuilder().withProperties(hotrodProperties).build();
RemoteCacheManager remoteCacheManager = new RemoteCacheManager(configuration);
this.cacheContainer = remoteCacheManager;
remoteCacheManager.start();
} else {
DefaultCacheManager defaultCacheManager = new DefaultCacheManager("infinispan.xml");
this.cacheContainer = defaultCacheManager;
defaultCacheManager.start();
HotRodServerConfiguration hotRodServerConfiguration = new HotRodServerConfigurationBuilder()
.host(get("PRIVATE_ADDRESS")).port(11222).build();
this.hotRodServer = new HotRodServer();
hotRodServer.start(hotRodServerConfiguration, defaultCacheManager);
}
}
示例2: setUp
import org.infinispan.manager.DefaultCacheManager; //导入方法依赖的package包/类
@Override
@Before
public void setUp() throws Exception {
basicCacheContainer = new DefaultCacheManager();
basicCacheContainer.start();
super.setUp();
}
示例3: setUp
import org.infinispan.manager.DefaultCacheManager; //导入方法依赖的package包/类
@Before
public void setUp() throws Exception {
basicCacheContainer = new DefaultCacheManager(GLOBAL_CONFIGURATION);
basicCacheContainer.start();
idempotentRepository = InfinispanIdempotentRepository.infinispanIdempotentRepository(basicCacheContainer, cacheName);
}