本文整理汇总了Java中org.infinispan.manager.EmbeddedCacheManager.stop方法的典型用法代码示例。如果您正苦于以下问题:Java EmbeddedCacheManager.stop方法的具体用法?Java EmbeddedCacheManager.stop怎么用?Java EmbeddedCacheManager.stop使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.infinispan.manager.EmbeddedCacheManager
的用法示例。
在下文中一共展示了EmbeddedCacheManager.stop方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testConfigBuilder
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
public void testConfigBuilder() {
GlobalConfiguration globalConfig = new GlobalConfigurationBuilder().globalJmxStatistics().transport().defaultTransport().build();
Configuration cacheConfig = new ConfigurationBuilder().persistence().addStore(LevelDBStoreConfigurationBuilder.class).location(tmpDataDirectory)
.expiredLocation(tmpExpiredDirectory).implementationType(LevelDBStoreConfiguration.ImplementationType.AUTO).build();
StoreConfiguration cacheLoaderConfig = cacheConfig.persistence().stores().get(0);
assertTrue(cacheLoaderConfig instanceof LevelDBStoreConfiguration);
LevelDBStoreConfiguration leveldbConfig = (LevelDBStoreConfiguration) cacheLoaderConfig;
assertEquals(tmpDataDirectory, leveldbConfig.location());
assertEquals(tmpExpiredDirectory, leveldbConfig.expiredLocation());
EmbeddedCacheManager cacheManager = new DefaultCacheManager(globalConfig);
cacheManager.defineConfiguration("testCache", cacheConfig);
cacheManager.start();
Cache<String, String> cache = cacheManager.getCache("testCache");
cache.put("hello", "there");
cache.stop();
cacheManager.stop();
}
示例2: testLegacyJavaConfig
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
@Test(enabled = false, description = "ISPN-3388")
public void testLegacyJavaConfig() {
GlobalConfiguration globalConfig = new GlobalConfigurationBuilder().globalJmxStatistics().transport().defaultTransport().build();
Configuration cacheConfig = new ConfigurationBuilder().persistence().addStore(LevelDBStoreConfigurationBuilder.class).addProperty("location", tmpDataDirectory)
.addProperty("expiredLocation", tmpExpiredDirectory).addProperty("implementationType", LevelDBStoreConfiguration.ImplementationType.AUTO.toString()).build();
EmbeddedCacheManager cacheManager = new DefaultCacheManager(globalConfig);
cacheManager.defineConfiguration("testCache", cacheConfig);
cacheManager.start();
Cache<String, String> cache = cacheManager.getCache("testCache");
cache.put("hello", "there legacy java");
cache.stop();
cacheManager.stop();
}
示例3: testConfigBuilder
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
public void testConfigBuilder() {
GlobalConfiguration globalConfig = new GlobalConfigurationBuilder().globalJmxStatistics().transport().defaultTransport().build();
Configuration cacheConfig = new ConfigurationBuilder().persistence().addStore(MapDBStoreConfigurationBuilder.class)
.location(tmpDirectory)
.compression(true)
.build();
StoreConfiguration cacheLoaderConfig = cacheConfig.persistence().stores().get(0);
assertTrue(cacheLoaderConfig instanceof MapDBStoreConfiguration);
MapDBStoreConfiguration config = (MapDBStoreConfiguration) cacheLoaderConfig;
assertEquals(true, config.compression());
EmbeddedCacheManager cacheManager = new DefaultCacheManager(globalConfig);
cacheManager.defineConfiguration("testCache", cacheConfig);
cacheManager.start();
Cache<String, String> cache = cacheManager.getCache("testCache");
cache.put("hello", "there");
cache.stop();
cacheManager.stop();
}
示例4: testConfigBuilder
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
public void testConfigBuilder() {
GlobalConfiguration globalConfig = new GlobalConfigurationBuilder().globalJmxStatistics().transport().defaultTransport().build();
Configuration cacheConfig = new ConfigurationBuilder().persistence().addStore(OffheapStoreConfigurationBuilder.class)
.compression(true)
.build();
StoreConfiguration cacheLoaderConfig = cacheConfig.persistence().stores().get(0);
assertTrue(cacheLoaderConfig instanceof OffheapStoreConfiguration);
OffheapStoreConfiguration config = (OffheapStoreConfiguration) cacheLoaderConfig;
assertEquals(true, config.compression());
EmbeddedCacheManager cacheManager = new DefaultCacheManager(globalConfig);
cacheManager.defineConfiguration("testCache", cacheConfig);
cacheManager.start();
Cache<String, String> cache = cacheManager.getCache("testCache");
cache.put("hello", "there");
cache.stop();
cacheManager.stop();
}
示例5: textXmlConfigLegacy
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
@Test(enabled = false, description = "ISPN-3388")
public void textXmlConfigLegacy() throws IOException {
EmbeddedCacheManager cacheManager = new DefaultCacheManager("config/leveldb-config-legacy-" +
LevelDBStoreConfiguration.ImplementationType.AUTO.toString().toLowerCase() + ".xml");
Cache<String, String> cache = cacheManager.getCache("testCache");
cache.put("hello", "there legacy xml");
cache.stop();
cacheManager.stop();
TestingUtil.recursiveFileRemove("/tmp/leveldb/legacy");
}
示例6: testXmlConfig60
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
public void testXmlConfig60() throws IOException {
EmbeddedCacheManager cacheManager = new DefaultCacheManager("config/leveldb-config-60-" +
LevelDBStoreConfiguration.ImplementationType.AUTO.toString().toLowerCase() + ".xml");
Cache<String, String> cache = cacheManager.getCache("testCache");
cache.put("hello", "there 60 xml");
cache.stop();
cacheManager.stop();
TestingUtil.recursiveFileRemove("/tmp/leveldb/60");
}
示例7: testXmlConfig60
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
public void testXmlConfig60() throws IOException {
EmbeddedCacheManager cacheManager = new DefaultCacheManager("config/mapdb-config-60.xml");
Cache<String, String> cache = cacheManager.getCache("testCache");
cache.put("hello", "there 60 xml");
cache.stop();
cacheManager.stop();
}
示例8: testXmlConfig
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
public void testXmlConfig() throws IOException {
EmbeddedCacheManager cacheManager = new DefaultCacheManager("config.xml");
Cache<String, String> cache = cacheManager.getCache("cassandracache");
cache.put("Hello", "Moon");
assertEquals(cache.get("Hello"), "Moon");
cache.stop();
cacheManager.stop();
}
示例9: testCustomStoreConfig
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
public void testCustomStoreConfig() throws IOException {
EmbeddedCacheManager cacheManager = new DefaultCacheManager("customstore-config.xml");
Cache<String, String> cache = cacheManager.getCache("cassandracache");
cache.put("Hi", "there");
assertEquals(cache.get("Hi"), "there");
cache.stop();
cacheManager.stop();
}
示例10: testXmlConfig60
import org.infinispan.manager.EmbeddedCacheManager; //导入方法依赖的package包/类
public void testXmlConfig60() throws IOException {
EmbeddedCacheManager cacheManager = new DefaultCacheManager("config/offheap-config-60.xml");
Cache<String, String> cache = cacheManager.getCache("testCache");
cache.put("hello", "there 52 xml");
cache.stop();
cacheManager.stop();
}