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);
}
Aggregations