use of com.hazelcast.map.impl.querycache.publisher.PublisherRegistry in project hazelcast by hazelcast.
the class PostJoinMapOperation method createQueryCaches.
private void createQueryCaches() {
MapService mapService = getService();
MapServiceContext mapServiceContext = mapService.getMapServiceContext();
QueryCacheContext queryCacheContext = mapServiceContext.getQueryCacheContext();
PublisherContext publisherContext = queryCacheContext.getPublisherContext();
MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
for (AccumulatorInfo info : infoList) {
addAccumulatorInfo(queryCacheContext, info);
PublisherRegistry publisherRegistry = mapPublisherRegistry.getOrCreate(info.getMapName());
publisherRegistry.getOrCreate(info.getCacheId());
// marker listener.
mapServiceContext.addLocalListenerAdapter((ListenerAdapter<IMapEvent>) event -> {
}, info.getMapName());
}
}
use of com.hazelcast.map.impl.querycache.publisher.PublisherRegistry in project hazelcast by hazelcast.
the class QueryCacheUtil method getAccumulatorRegistryOrNull.
/**
* Returns {@code PartitionAccumulatorRegistry} of a {@code QueryCache}.
*
* @see PartitionAccumulatorRegistry
*/
@Nullable
public static PartitionAccumulatorRegistry getAccumulatorRegistryOrNull(QueryCacheContext context, String mapName, String cacheId) {
PublisherContext publisherContext = context.getPublisherContext();
MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
PublisherRegistry publisherRegistry = mapPublisherRegistry.getOrNull(mapName);
if (publisherRegistry == null) {
return null;
}
return publisherRegistry.getOrNull(cacheId);
}
Aggregations