use of com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfoSupplier in project hazelcast by hazelcast.
the class AccumulatorSweeper method sendEndOfSequenceEvents.
public static void sendEndOfSequenceEvents(PublisherContext publisherContext, int partitionId) {
QueryCacheEventData endOfSequenceEvent = createEndOfSequenceEvent(partitionId);
QueryCacheContext context = publisherContext.getContext();
EventPublisherAccumulatorProcessor processor = new EventPublisherAccumulatorProcessor(context.getQueryCacheEventService());
AccumulatorInfoSupplier infoSupplier = publisherContext.getAccumulatorInfoSupplier();
ConcurrentMap<String, ConcurrentMap<String, AccumulatorInfo>> all = infoSupplier.getAll();
for (ConcurrentMap<String, AccumulatorInfo> oneMapsAccumulators : all.values()) {
for (AccumulatorInfo accumulatorInfo : oneMapsAccumulators.values()) {
if (accumulatorInfo.getDelaySeconds() == 0) {
processor.setInfo(accumulatorInfo);
processor.process(endOfSequenceEvent);
}
}
}
}
use of com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfoSupplier 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.getCacheId(), info);
}
use of com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfoSupplier in project hazelcast by hazelcast.
the class PublisherCreateOperation method registerAccumulatorInfo.
private void registerAccumulatorInfo() {
String mapName = info.getMapName();
String cacheId = info.getCacheId();
PublisherContext publisherContext = getPublisherContext();
AccumulatorInfoSupplier infoSupplier = publisherContext.getAccumulatorInfoSupplier();
infoSupplier.putIfAbsent(mapName, cacheId, info);
}
use of com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfoSupplier in project hazelcast by hazelcast.
the class DestroyQueryCacheOperation method removeAccumulatorInfo.
private void removeAccumulatorInfo() {
PublisherContext publisherContext = getPublisherContext();
AccumulatorInfoSupplier infoSupplier = publisherContext.getAccumulatorInfoSupplier();
infoSupplier.remove(name, cacheId);
}
use of com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfoSupplier in project hazelcast by hazelcast.
the class AbstractQueryCacheEndToEndConstructor method addInfoToSubscriberContext.
private void addInfoToSubscriberContext(AccumulatorInfo info) {
SubscriberContext subscriberContext = context.getSubscriberContext();
AccumulatorInfoSupplier accumulatorInfoSupplier = subscriberContext.getAccumulatorInfoSupplier();
accumulatorInfoSupplier.putIfAbsent(info.getMapName(), info.getCacheId(), info);
}
Aggregations