Search in sources :

Example 1 with QueryCacheListenerRegistry

use of com.hazelcast.map.impl.querycache.publisher.QueryCacheListenerRegistry 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 2 with QueryCacheListenerRegistry

use of com.hazelcast.map.impl.querycache.publisher.QueryCacheListenerRegistry 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)

Aggregations

MapListenerRegistry (com.hazelcast.map.impl.querycache.publisher.MapListenerRegistry)2 PublisherContext (com.hazelcast.map.impl.querycache.publisher.PublisherContext)2 QueryCacheListenerRegistry (com.hazelcast.map.impl.querycache.publisher.QueryCacheListenerRegistry)2