Search in sources :

Example 1 with NearCachedClientCacheProxy

use of com.hazelcast.client.cache.impl.nearcache.NearCachedClientCacheProxy in project hazelcast by hazelcast.

the class ClientCacheProxyFactory method create.

@Override
public ClientProxy create(String id, ClientContext context) {
    CacheConfig cacheConfig = findCacheConfig(id);
    if (cacheConfig == null) {
        throw new CacheNotExistsException("Cache " + id + " is already destroyed or not created yet");
    }
    NearCacheConfig nearCacheConfig = client.getClientConfig().getNearCacheConfig(cacheConfig.getName());
    if (nearCacheConfig != null) {
        return new NearCachedClientCacheProxy(cacheConfig, context);
    }
    return new ClientCacheProxy(cacheConfig, context);
}
Also used : NearCachedClientCacheProxy(com.hazelcast.client.cache.impl.nearcache.NearCachedClientCacheProxy) NearCachedClientCacheProxy(com.hazelcast.client.cache.impl.nearcache.NearCachedClientCacheProxy) NearCacheConfig(com.hazelcast.config.NearCacheConfig) CacheConfig(com.hazelcast.config.CacheConfig) NearCacheConfig(com.hazelcast.config.NearCacheConfig) CacheNotExistsException(com.hazelcast.cache.CacheNotExistsException)

Aggregations

CacheNotExistsException (com.hazelcast.cache.CacheNotExistsException)1 NearCachedClientCacheProxy (com.hazelcast.client.cache.impl.nearcache.NearCachedClientCacheProxy)1 CacheConfig (com.hazelcast.config.CacheConfig)1 NearCacheConfig (com.hazelcast.config.NearCacheConfig)1