use of com.hazelcast.map.impl.querycache.publisher.PublisherContext in project hazelcast by hazelcast.
the class MapClientAwareService method clientDisconnected.
@Override
public void clientDisconnected(String clientUuid) {
QueryCacheContext queryCacheContext = mapServiceContext.getQueryCacheContext();
PublisherContext publisherContext = queryCacheContext.getPublisherContext();
publisherContext.handleDisconnectedSubscriber(clientUuid);
}
use of com.hazelcast.map.impl.querycache.publisher.PublisherContext in project hazelcast by hazelcast.
the class MapPostJoinAwareService method getAccumulatorInfoList.
private List<AccumulatorInfo> getAccumulatorInfoList() {
List<AccumulatorInfo> infoList = new ArrayList<AccumulatorInfo>();
PublisherContext publisherContext = mapServiceContext.getQueryCacheContext().getPublisherContext();
MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
Map<String, PublisherRegistry> cachesOfMaps = mapPublisherRegistry.getAll();
Collection<PublisherRegistry> publisherRegistries = cachesOfMaps.values();
for (PublisherRegistry publisherRegistry : publisherRegistries) {
Collection<PartitionAccumulatorRegistry> partitionAccumulatorRegistries = publisherRegistry.getAll().values();
for (PartitionAccumulatorRegistry accumulatorRegistry : partitionAccumulatorRegistries) {
AccumulatorInfo info = accumulatorRegistry.getInfo();
infoList.add(info);
}
}
return infoList;
}
use of com.hazelcast.map.impl.querycache.publisher.PublisherContext in project hazelcast by hazelcast.
the class QueryCacheEventPublisher method getPartitionAccumulatorRegistries.
private Collection<PartitionAccumulatorRegistry> getPartitionAccumulatorRegistries(String mapName) {
PublisherContext publisherContext = queryCacheContext.getPublisherContext();
MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
PublisherRegistry publisherRegistry = mapPublisherRegistry.getOrNull(mapName);
if (publisherRegistry == null) {
return Collections.emptySet();
}
// this collection contains all query-caches for this map
return publisherRegistry.getAll().values();
}
use of com.hazelcast.map.impl.querycache.publisher.PublisherContext in project hazelcast by hazelcast.
the class PostJoinMapOperation method addAccumulatorInfo.
private void addAccumulatorInfo(QueryCacheContext context, AccumulatorInfo info) {
PublisherContext publisherContext = context.getPublisherContext();
AccumulatorInfoSupplier infoSupplier = publisherContext.getAccumulatorInfoSupplier();
infoSupplier.putIfAbsent(info.getMapName(), info.getCacheName(), info);
}
use of com.hazelcast.map.impl.querycache.publisher.PublisherContext in project hazelcast by hazelcast.
the class DestroyQueryCacheOperation method removeAccumulatorInfo.
private void removeAccumulatorInfo() {
PublisherContext publisherContext = getPublisherContext();
AccumulatorInfoSupplier infoSupplier = publisherContext.getAccumulatorInfoSupplier();
infoSupplier.remove(name, cacheName);
}
Aggregations