use of com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfo in project hazelcast by hazelcast.
the class AccumulatorConsumerOperation method publishAccumulator.
private void publishAccumulator(EventPublisherAccumulatorProcessor processor, AccumulatorHandler<Sequenced> handler, Accumulator accumulator) {
AccumulatorInfo info = accumulator.getInfo();
processor.setInfo(info);
accumulator.poll(handler, info.getDelaySeconds(), TimeUnit.SECONDS);
}
use of com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfo in project hazelcast by hazelcast.
the class SubscriberAccumulator method createAccumulatorHandler.
private SubscriberAccumulatorHandler createAccumulatorHandler() {
AccumulatorInfo info = getInfo();
boolean includeValue = info.isIncludeValue();
InternalQueryCache queryCache = getQueryCache();
InternalSerializationService serializationService = context.getSerializationService();
return new SubscriberAccumulatorHandler(includeValue, queryCache, serializationService);
}
use of com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfo 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.AccumulatorInfo in project hazelcast by hazelcast.
the class BatchPublisherAccumulator method accumulate.
@Override
public void accumulate(Sequenced sequenced) {
super.accumulate(sequenced);
AccumulatorInfo info = getInfo();
if (!info.isPublishable()) {
return;
}
poll(handler, info.getBatchSize());
poll(handler, info.getDelaySeconds(), TimeUnit.SECONDS);
}
use of com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfo in project hazelcast by hazelcast.
the class MapPostJoinAwareService method getPostJoinOperation.
@Override
public Operation getPostJoinOperation() {
PostJoinMapOperation postJoinOp = new PostJoinMapOperation();
final Map<String, MapContainer> mapContainers = mapServiceContext.getMapContainers();
for (MapContainer mapContainer : mapContainers.values()) {
postJoinOp.addMapInterceptors(mapContainer);
}
List<AccumulatorInfo> infoList = getAccumulatorInfoList();
postJoinOp.setInfoList(infoList);
postJoinOp.setNodeEngine(mapServiceContext.getNodeEngine());
return postJoinOp;
}
Aggregations