Search in sources :

Example 1 with CacheConfiguration

use of com.hazelcast.config.CacheConfiguration in project hazelcast by hazelcast.

the class CallbackAwareClientDelegatingFutureTest method createCache.

private Cache createCache(int blockMilis, boolean throwError) {
    CachingProvider cachingProvider = HazelcastClientCachingProvider.createCachingProvider(client);
    CacheManager cacheManager = cachingProvider.getCacheManager();
    CacheConfiguration cacheConfig = new CacheConfig().setReadThrough(true).setCacheLoaderFactory(new BlockableCacheLoaderFactory(blockMilis, throwError));
    return cacheManager.createCache(CACHE_NAME, cacheConfig);
}
Also used : HazelcastCacheManager(com.hazelcast.cache.HazelcastCacheManager) CacheManager(javax.cache.CacheManager) CacheConfig(com.hazelcast.config.CacheConfig) CacheConfiguration(com.hazelcast.config.CacheConfiguration) CachingProvider(javax.cache.spi.CachingProvider)

Aggregations

HazelcastCacheManager (com.hazelcast.cache.HazelcastCacheManager)1 CacheConfig (com.hazelcast.config.CacheConfig)1 CacheConfiguration (com.hazelcast.config.CacheConfiguration)1 CacheManager (javax.cache.CacheManager)1 CachingProvider (javax.cache.spi.CachingProvider)1