本文整理匯總了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);
}