Search in sources :

Example 1 with ClientICacheManager

use of com.hazelcast.client.impl.clientside.ClientICacheManager 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);
    }
}
Also used : ClientICacheManager(com.hazelcast.client.impl.clientside.ClientICacheManager) ICacheInternal(com.hazelcast.cache.impl.ICacheInternal)

Aggregations

ICacheInternal (com.hazelcast.cache.impl.ICacheInternal)1 ClientICacheManager (com.hazelcast.client.impl.clientside.ClientICacheManager)1