use of com.hazelcast.map.impl.querycache.publisher.PublisherRegistry in project hazelcast by hazelcast.
the class DestroyQueryCacheOperation method removePublisherAccumulators.
private void removePublisherAccumulators() {
PublisherContext publisherContext = getPublisherContext();
MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
PublisherRegistry publisherRegistry = mapPublisherRegistry.getOrNull(name);
if (publisherRegistry == null) {
return;
}
publisherRegistry.remove(cacheId);
}
use of com.hazelcast.map.impl.querycache.publisher.PublisherRegistry in project hazelcast by hazelcast.
the class ClientQueryCacheMemoryLeakTest method assertNoPartitionAccumulatorRegistryLeft.
private static void assertNoPartitionAccumulatorRegistryLeft(HazelcastInstance node, String mapName) {
PublisherContext publisherContext = getPublisherContext(node);
MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
PublisherRegistry registry = mapPublisherRegistry.getOrCreate(mapName);
if (registry == null) {
return;
}
Map<String, PartitionAccumulatorRegistry> accumulatorRegistryMap = registry.getAll();
assertTrue(accumulatorRegistryMap.isEmpty());
}
use of com.hazelcast.map.impl.querycache.publisher.PublisherRegistry in project hazelcast by hazelcast.
the class AccumulatorConsumerOperation method removeAccumulator.
private void removeAccumulator(QueryCacheContext context, Accumulator accumulator) {
PublisherContext publisherContext = context.getPublisherContext();
MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
AccumulatorInfo info = accumulator.getInfo();
String mapName = info.getMapName();
String cacheName = info.getCacheName();
PublisherRegistry publisherRegistry = mapPublisherRegistry.getOrNull(mapName);
if (publisherRegistry == null) {
return;
}
PartitionAccumulatorRegistry partitionAccumulatorRegistry = publisherRegistry.getOrNull(cacheName);
if (partitionAccumulatorRegistry == null) {
return;
}
partitionAccumulatorRegistry.remove(getPartitionId());
}
use of com.hazelcast.map.impl.querycache.publisher.PublisherRegistry in project hazelcast by hazelcast.
the class QueryCacheMemoryLeakTest method assertNoPartitionAccumulatorRegistryLeft.
private static void assertNoPartitionAccumulatorRegistryLeft(HazelcastInstance node, String mapName) {
PublisherContext publisherContext = getPublisherContext(node);
MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
PublisherRegistry registry = mapPublisherRegistry.getOrCreate(mapName);
if (registry == null) {
return;
}
Map<String, PartitionAccumulatorRegistry> accumulatorRegistryMap = registry.getAll();
assertTrue(accumulatorRegistryMap.isEmpty());
}
use of com.hazelcast.map.impl.querycache.publisher.PublisherRegistry in project hazelcast by hazelcast.
the class ConsumeAccumulatorOperation method removeAccumulator.
private void removeAccumulator(QueryCacheContext context, Accumulator accumulator) {
PublisherContext publisherContext = context.getPublisherContext();
MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
AccumulatorInfo info = accumulator.getInfo();
String mapName = info.getMapName();
String cacheName = info.getCacheId();
PublisherRegistry publisherRegistry = mapPublisherRegistry.getOrNull(mapName);
if (publisherRegistry == null) {
return;
}
PartitionAccumulatorRegistry partitionAccumulatorRegistry = publisherRegistry.getOrNull(cacheName);
if (partitionAccumulatorRegistry == null) {
return;
}
partitionAccumulatorRegistry.remove(getPartitionId());
}
Aggregations