當前位置: 首頁>>代碼示例>>Java>>正文


Java CacheManager.destroyCache方法代碼示例

本文整理匯總了Java中javax.cache.CacheManager.destroyCache方法的典型用法代碼示例。如果您正苦於以下問題:Java CacheManager.destroyCache方法的具體用法?Java CacheManager.destroyCache怎麽用?Java CacheManager.destroyCache使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在javax.cache.CacheManager的用法示例。


在下文中一共展示了CacheManager.destroyCache方法的14個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: after

import javax.cache.CacheManager; //導入方法依賴的package包/類
@AfterClass
public static void after() throws Exception {
    CacheManager cacheManager = Caching.getCachingProvider().getCacheManager();

    cacheManager.destroyCache(CacheBasedDataModelAccessor.DATA_MODEL_TO_ID_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataModelAccessor.DATA_MODEL_TO_NAME_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_ID_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_NAME_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataSourceHub.DATA_SOURCE_CACHE_NAME);
    cacheManager.destroyCache(DataSetOptimisationsCache.DATA_SET_TO_LAZY_PARAMETERS);
    cacheManager.destroyCache(DataSetOptimisationsCache.DATA_SET_DS_LOOKUP_PARAMETERS);
}
 
開發者ID:DataArt,項目名稱:CalculationEngine,代碼行數:13,代碼來源:Skills_Sql_Table_Test.java

示例2: after

import javax.cache.CacheManager; //導入方法依賴的package包/類
@AfterClass
public static void after() throws Exception {
    CacheManager cacheManager = Caching.getCachingProvider().getCacheManager();

    cacheManager.destroyCache(CacheBasedDataModelAccessor.DATA_MODEL_TO_ID_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataModelAccessor.DATA_MODEL_TO_NAME_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedMetaFunctionAccessor.META_FUNCTIONS_CACHE_NAME);
}
 
開發者ID:DataArt,項目名稱:CalculationEngine,代碼行數:9,代碼來源:FuncexecNoSingleton_Test.java

示例3: after

import javax.cache.CacheManager; //導入方法依賴的package包/類
@AfterClass
public static void after() throws Exception {
    CacheManager cacheManager = Caching.getCachingProvider().getCacheManager();

    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_ID_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_NAME_CACHE_NAME);
}
 
開發者ID:DataArt,項目名稱:CalculationEngine,代碼行數:8,代碼來源:Validate_Function_Test.java

示例4: after

import javax.cache.CacheManager; //導入方法依賴的package包/類
@AfterClass
public static void after() throws Exception {
    CacheManager cacheManager = Caching.getCachingProvider().getCacheManager();

    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_ID_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_NAME_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataModelAccessor.DATA_MODEL_TO_ID_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataModelAccessor.DATA_MODEL_TO_NAME_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedMetaFunctionAccessor.META_FUNCTIONS_CACHE_NAME);
}
 
開發者ID:DataArt,項目名稱:CalculationEngine,代碼行數:11,代碼來源:ValidateWithFuncexec_Function_Test.java

示例5: after

import javax.cache.CacheManager; //導入方法依賴的package包/類
@AfterClass
public static void after() throws Exception {
    CacheManager cacheManager = Caching.getCachingProvider().getCacheManager();

    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_ID_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_NAME_CACHE_NAME);
    cacheManager.destroyCache(DataSetOptimisationsCache.DATA_SET_TO_LAZY_PARAMETERS);
    cacheManager.destroyCache(DataSetOptimisationsCache.DATA_SET_DS_LOOKUP_PARAMETERS);
}
 
開發者ID:DataArt,項目名稱:CalculationEngine,代碼行數:10,代碼來源:Monthly_Data_Query_Test.java

示例6: destroyExternalServices

import javax.cache.CacheManager; //導入方法依賴的package包/類
public static void destroyExternalServices() throws Exception {
    CacheManager cacheManager = Caching.getCachingProvider().getCacheManager();

    cacheManager.destroyCache(CacheBasedDataModelAccessor.DATA_MODEL_TO_ID_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataModelAccessor.DATA_MODEL_TO_NAME_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_ID_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataSetAccessor.DATA_SET_TO_NAME_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedDataSourceHub.DATA_SOURCE_CACHE_NAME);
    cacheManager.destroyCache(CacheBasedMetaFunctionAccessor.META_FUNCTIONS_CACHE_NAME);
    cacheManager.destroyCache(DataSetOptimisationsCache.DATA_SET_TO_LAZY_PARAMETERS);
}
 
開發者ID:DataArt,項目名稱:CalculationEngine,代碼行數:12,代碼來源:GraphTestUtil.java

示例7: testTckStyleCreateDestroyClose

import javax.cache.CacheManager; //導入方法依賴的package包/類
/**
 * Tests start -> destroy -> start -> close using CacheManager.
 */
public void testTckStyleCreateDestroyClose() throws Exception {
    startGridsMultiThreaded(gridCount());

    CacheManager mgr = Caching.getCachingProvider().getCacheManager();

    String cacheName = "cache";

    mgr.createCache(cacheName, new MutableConfiguration<Integer, String>().setTypes(Integer.class, String.class));

    mgr.destroyCache(cacheName);

    Cache<Integer, String> cache = mgr.createCache(cacheName,
        new MutableConfiguration<Integer, String>().setTypes(Integer.class, String.class));

    cache.close();

    // Check second close succeeds without exception.
    cache.close();

    try {
        cache.get(1);

        fail();
    }
    catch (IllegalStateException ignored) {
        // No-op;
    }
}
 
開發者ID:apache,項目名稱:ignite,代碼行數:32,代碼來源:CacheStopAndDestroySelfTest.java

示例8: getCacheNullValueClass

import javax.cache.CacheManager; //導入方法依賴的package包/類
@Test(expected = NullPointerException.class)
public void getCacheNullValueClass() {
    String name = "c1";
    CacheManager manager = Caching.getCachingProvider().getCacheManager();
    manager.createCache(name, new MutableConfiguration().setTypes(Long.class, String.class));
    try {
        Caching.getCache(name, Long.class, null);
    } finally {
        manager.destroyCache(name);
    }
}
 
開發者ID:diennea,項目名稱:blazingcache,代碼行數:12,代碼來源:TCKCacheManagerTest.java

示例9: removeCache_Null

import javax.cache.CacheManager; //導入方法依賴的package包/類
@Test
public void removeCache_Null() {
    CacheManager cacheManager = getCacheManager();
    try {
        cacheManager.destroyCache(null);
        fail("should have thrown an exception - cache name null");
    } catch (NullPointerException e) {
        //good
    }
}
 
開發者ID:diennea,項目名稱:blazingcache,代碼行數:11,代碼來源:TCKCacheManagerTest.java

示例10: removeCache_There

import javax.cache.CacheManager; //導入方法依賴的package包/類
@Test
public void removeCache_There() {
    CacheManager cacheManager = getCacheManager();
    String name1 = "c1";
    cacheManager.createCache(name1, new MutableConfiguration());
    cacheManager.destroyCache(name1);
    assertFalse(cacheManager.getCacheNames().iterator().hasNext());
}
 
開發者ID:diennea,項目名稱:blazingcache,代碼行數:9,代碼來源:TCKCacheManagerTest.java

示例11: removeCache_CacheStopped

import javax.cache.CacheManager; //導入方法依賴的package包/類
@Test
public void removeCache_CacheStopped() {
    CacheManager cacheManager = getCacheManager();
    String name1 = "c1";
    cacheManager.createCache(name1, new MutableConfiguration());
    Cache cache1 = cacheManager.getCache(name1);
    cacheManager.destroyCache(name1);
    ensureClosed(cache1);
}
 
開發者ID:diennea,項目名稱:blazingcache,代碼行數:10,代碼來源:TCKCacheManagerTest.java

示例12: removeCache_Stopped

import javax.cache.CacheManager; //導入方法依賴的package包/類
@Test
public void removeCache_Stopped() {
    CacheManager cacheManager = getCacheManager();
    cacheManager.close();
    try {
        cacheManager.destroyCache("c1");
        fail();
    } catch (IllegalStateException e) {
        //ok
    }
}
 
開發者ID:diennea,項目名稱:blazingcache,代碼行數:12,代碼來源:TCKCacheManagerTest.java

示例13: put

import javax.cache.CacheManager; //導入方法依賴的package包/類
private static void put() {

        System.setProperty("hazelcast.jcache.provider.type", "server");

        CachingProvider cachingProvider = Caching.getCachingProvider();
        CacheManager cacheManager = cachingProvider.getCacheManager();

        //configure the cache
        MutableConfiguration<String, String> config = new MutableConfiguration<String, String>();
        config.setStoreByValue(true)
                .setTypes(String.class, String.class)
                .setExpiryPolicyFactory(AccessedExpiryPolicy.factoryOf(Duration.FIVE_MINUTES))
                .setStatisticsEnabled(true);


        cacheManager.destroyCache("MY_CACHE");
        //create the cache
        cacheManager.createCache("MY_CACHE", config);

        //get the cache
        Cache<String, String> cache = cacheManager.getCache("MY_CACHE", String.class, String.class);
        cache.put("theKey", "Hello World");
        String value = cache.get("theKey");

        System.out.println("echo cache.get('theKey') = " + value);//prints 'Hello World'

        for (int increment = 0; increment < 100; increment++) {
            cache.put("key-" + increment, "Hello World - " + increment);
        }

        System.out.println("End");
    }
 
開發者ID:kasunbg,項目名稱:jcache-samples,代碼行數:33,代碼來源:JCacheSetter.java

示例14: removeCache_NotThere

import javax.cache.CacheManager; //導入方法依賴的package包/類
@Test
public void removeCache_NotThere() {
    CacheManager cacheManager = getCacheManager();
    cacheManager.destroyCache("c1");
}
 
開發者ID:diennea,項目名稱:blazingcache,代碼行數:6,代碼來源:TCKCacheManagerTest.java


注:本文中的javax.cache.CacheManager.destroyCache方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。