Search in sources :

Example 6 with PublisherContext

use of com.hazelcast.map.impl.querycache.publisher.PublisherContext in project hazelcast by hazelcast.

the class DestroyQueryCacheOperation method deregisterLocalIMapListener.

private void deregisterLocalIMapListener() {
    PublisherContext publisherContext = getPublisherContext();
    MapListenerRegistry registry = publisherContext.getMapListenerRegistry();
    QueryCacheListenerRegistry listenerRegistry = registry.getOrNull(name);
    if (listenerRegistry == null) {
        return;
    }
    String listenerId = listenerRegistry.remove(cacheName);
    mapService.getMapServiceContext().removeEventListener(name, listenerId);
}
Also used : MapListenerRegistry(com.hazelcast.map.impl.querycache.publisher.MapListenerRegistry) PublisherContext(com.hazelcast.map.impl.querycache.publisher.PublisherContext) QueryCacheListenerRegistry(com.hazelcast.map.impl.querycache.publisher.QueryCacheListenerRegistry)

Example 7 with PublisherContext

use of com.hazelcast.map.impl.querycache.publisher.PublisherContext 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(cacheName);
}
Also used : MapPublisherRegistry(com.hazelcast.map.impl.querycache.publisher.MapPublisherRegistry) MapPublisherRegistry(com.hazelcast.map.impl.querycache.publisher.MapPublisherRegistry) PublisherRegistry(com.hazelcast.map.impl.querycache.publisher.PublisherRegistry) PublisherContext(com.hazelcast.map.impl.querycache.publisher.PublisherContext)

Example 8 with PublisherContext

use of com.hazelcast.map.impl.querycache.publisher.PublisherContext in project hazelcast by hazelcast.

the class PublisherCreateOperation method registerPublisherAccumulator.

private void registerPublisherAccumulator() {
    String mapName = info.getMapName();
    String cacheName = info.getCacheName();
    PublisherContext publisherContext = getPublisherContext();
    MapPublisherRegistry mapPublisherRegistry = publisherContext.getMapPublisherRegistry();
    PublisherRegistry publisherRegistry = mapPublisherRegistry.getOrCreate(mapName);
    PartitionAccumulatorRegistry partitionAccumulatorRegistry = publisherRegistry.getOrCreate(cacheName);
    partitionAccumulatorRegistry.setUuid(getCallerUuid());
}
Also used : MapPublisherRegistry(com.hazelcast.map.impl.querycache.publisher.MapPublisherRegistry) PartitionAccumulatorRegistry(com.hazelcast.map.impl.querycache.publisher.PartitionAccumulatorRegistry) MapPublisherRegistry(com.hazelcast.map.impl.querycache.publisher.MapPublisherRegistry) PublisherRegistry(com.hazelcast.map.impl.querycache.publisher.PublisherRegistry) PublisherContext(com.hazelcast.map.impl.querycache.publisher.PublisherContext)

Example 9 with PublisherContext

use of com.hazelcast.map.impl.querycache.publisher.PublisherContext in project hazelcast by hazelcast.

the class PublisherCreateOperation method registerLocalIMapListener.

private void registerLocalIMapListener() {
    String mapName = info.getMapName();
    String cacheName = info.getCacheName();
    PublisherContext publisherContext = getPublisherContext();
    MapListenerRegistry registry = publisherContext.getMapListenerRegistry();
    QueryCacheListenerRegistry listenerRegistry = registry.getOrCreate(mapName);
    listenerRegistry.getOrCreate(cacheName);
}
Also used : MapListenerRegistry(com.hazelcast.map.impl.querycache.publisher.MapListenerRegistry) PublisherContext(com.hazelcast.map.impl.querycache.publisher.PublisherContext) QueryCacheListenerRegistry(com.hazelcast.map.impl.querycache.publisher.QueryCacheListenerRegistry)

Example 10 with PublisherContext

use of com.hazelcast.map.impl.querycache.publisher.PublisherContext in project hazelcast by hazelcast.

the class PublisherCreateOperation method registerAccumulatorInfo.

private void registerAccumulatorInfo() {
    String mapName = info.getMapName();
    String cacheName = info.getCacheName();
    PublisherContext publisherContext = getPublisherContext();
    AccumulatorInfoSupplier infoSupplier = publisherContext.getAccumulatorInfoSupplier();
    infoSupplier.putIfAbsent(mapName, cacheName, info);
}
Also used : AccumulatorInfoSupplier(com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfoSupplier) PublisherContext(com.hazelcast.map.impl.querycache.publisher.PublisherContext)

Aggregations

PublisherContext (com.hazelcast.map.impl.querycache.publisher.PublisherContext)17 MapPublisherRegistry (com.hazelcast.map.impl.querycache.publisher.MapPublisherRegistry)9 PublisherRegistry (com.hazelcast.map.impl.querycache.publisher.PublisherRegistry)9 QueryCacheContext (com.hazelcast.map.impl.querycache.QueryCacheContext)4 PartitionAccumulatorRegistry (com.hazelcast.map.impl.querycache.publisher.PartitionAccumulatorRegistry)4 AccumulatorInfo (com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfo)3 AccumulatorInfoSupplier (com.hazelcast.map.impl.querycache.accumulator.AccumulatorInfoSupplier)3 MapListenerRegistry (com.hazelcast.map.impl.querycache.publisher.MapListenerRegistry)2 QueryCacheListenerRegistry (com.hazelcast.map.impl.querycache.publisher.QueryCacheListenerRegistry)2 IMapEvent (com.hazelcast.core.IMapEvent)1 MapService (com.hazelcast.map.impl.MapService)1 MapServiceContext (com.hazelcast.map.impl.MapServiceContext)1 AccumulatorConsumerOperation (com.hazelcast.map.impl.operation.AccumulatorConsumerOperation)1 RecordStore (com.hazelcast.map.impl.recordstore.RecordStore)1 Operation (com.hazelcast.spi.Operation)1 NodeEngineImpl (com.hazelcast.spi.impl.NodeEngineImpl)1 MigrationEndpoint (com.hazelcast.spi.partition.MigrationEndpoint)1 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1