Search in sources :

Example 1 with SubscriberContext

use of com.hazelcast.map.impl.querycache.subscriber.SubscriberContext in project hazelcast by hazelcast.

the class MapProxyImpl method createQueryCache.

private QueryCache<K, V> createQueryCache(QueryCacheRequest request) {
    ConstructorFunction<String, InternalQueryCache> constructorFunction = new NodeQueryCacheEndToEndConstructor(request);
    QueryCacheContext queryCacheContext = request.getContext();
    SubscriberContext subscriberContext = queryCacheContext.getSubscriberContext();
    QueryCacheEndToEndProvider queryCacheEndToEndProvider = subscriberContext.getEndToEndQueryCacheProvider();
    return queryCacheEndToEndProvider.getOrCreateQueryCache(request.getMapName(), request.getUserGivenCacheName(), constructorFunction);
}
Also used : QueryCacheEndToEndProvider(com.hazelcast.map.impl.querycache.subscriber.QueryCacheEndToEndProvider) InternalQueryCache(com.hazelcast.map.impl.querycache.subscriber.InternalQueryCache) SubscriberContext(com.hazelcast.map.impl.querycache.subscriber.SubscriberContext) NodeQueryCacheEndToEndConstructor(com.hazelcast.map.impl.querycache.subscriber.NodeQueryCacheEndToEndConstructor) QueryCacheContext(com.hazelcast.map.impl.querycache.QueryCacheContext)

Example 2 with SubscriberContext

use of com.hazelcast.map.impl.querycache.subscriber.SubscriberContext in project hazelcast by hazelcast.

the class ClientMapProxy method createQueryCache.

private QueryCache createQueryCache(QueryCacheRequest request) {
    ConstructorFunction<String, InternalQueryCache> constructorFunction = new ClientQueryCacheEndToEndConstructor(request);
    SubscriberContext subscriberContext = getQueryContext().getSubscriberContext();
    QueryCacheEndToEndProvider queryCacheEndToEndProvider = subscriberContext.getEndToEndQueryCacheProvider();
    return queryCacheEndToEndProvider.getOrCreateQueryCache(request.getMapName(), request.getUserGivenCacheName(), constructorFunction);
}
Also used : QueryCacheEndToEndProvider(com.hazelcast.map.impl.querycache.subscriber.QueryCacheEndToEndProvider) InternalQueryCache(com.hazelcast.map.impl.querycache.subscriber.InternalQueryCache) SubscriberContext(com.hazelcast.map.impl.querycache.subscriber.SubscriberContext) ClientQueryCacheEndToEndConstructor(com.hazelcast.client.impl.querycache.subscriber.ClientQueryCacheEndToEndConstructor)

Aggregations

InternalQueryCache (com.hazelcast.map.impl.querycache.subscriber.InternalQueryCache)2 QueryCacheEndToEndProvider (com.hazelcast.map.impl.querycache.subscriber.QueryCacheEndToEndProvider)2 SubscriberContext (com.hazelcast.map.impl.querycache.subscriber.SubscriberContext)2 ClientQueryCacheEndToEndConstructor (com.hazelcast.client.impl.querycache.subscriber.ClientQueryCacheEndToEndConstructor)1 QueryCacheContext (com.hazelcast.map.impl.querycache.QueryCacheContext)1 NodeQueryCacheEndToEndConstructor (com.hazelcast.map.impl.querycache.subscriber.NodeQueryCacheEndToEndConstructor)1