use of com.hazelcast.cache.impl.ICacheInternal in project hazelcast by hazelcast.
the class HazelcastClientCacheManager method createCacheProxy.
@Override
protected <K, V> ICacheInternal<K, V> createCacheProxy(CacheConfig<K, V> cacheConfig) {
clientCacheProxyFactory.addCacheConfig(cacheConfig.getNameWithPrefix(), cacheConfig);
try {
ClientICacheManager cacheManager = client.getCacheManager();
String nameWithPrefix = cacheConfig.getNameWithPrefix();
ICacheInternal<K, V> cache = (ICacheInternal<K, V>) cacheManager.getCacheByFullName(nameWithPrefix);
cache.setCacheManager(this);
return cache;
} catch (Throwable t) {
clientCacheProxyFactory.removeCacheConfig(cacheConfig.getNameWithPrefix());
throw rethrow(t);
}
}
use of com.hazelcast.cache.impl.ICacheInternal in project hazelcast by hazelcast.
the class AbstractClientCachePartitionIteratorTest method getCacheProxy.
private <K, V> ICacheInternal<K, V> getCacheProxy() {
String cacheName = randomString();
CacheManager cacheManager = cachingProvider.getCacheManager();
CacheConfig<K, V> config = new CacheConfig<K, V>();
config.getEvictionConfig().setMaxSizePolicy(MaxSizePolicy.ENTRY_COUNT).setSize(10000000);
return (ICacheInternal<K, V>) cacheManager.createCache(cacheName, config);
}
Aggregations