use of com.hazelcast.spi.EventFilter in project hazelcast by hazelcast.
the class ReplicatedMapProxy method addEntryListener.
@Override
public String addEntryListener(EntryListener<K, V> listener, K key) {
isNotNull(listener, "listener");
EventFilter eventFilter = new ReplicatedEntryEventFilter(serializationService.toData(key));
return eventPublishingService.addEventListener(listener, eventFilter, name);
}
use of com.hazelcast.spi.EventFilter in project hazelcast by hazelcast.
the class ReplicatedMapProxy method addEntryListener.
@Override
public String addEntryListener(EntryListener<K, V> listener, Predicate<K, V> predicate, K key) {
isNotNull(listener, "listener");
EventFilter eventFilter = new ReplicatedQueryEventFilter(serializationService.toData(key), predicate);
return eventPublishingService.addEventListener(listener, eventFilter, name);
}
use of com.hazelcast.spi.EventFilter in project hazelcast by hazelcast.
the class EventServiceSegment method pingNotifiableEventListener.
private void pingNotifiableEventListener(String topic, Registration registration, boolean register) {
Object listener = registration.getListener();
if (!(listener instanceof NotifiableEventListener)) {
EventFilter filter = registration.getFilter();
if (filter instanceof ListenerWrapperEventFilter) {
listener = ((ListenerWrapperEventFilter) filter).getListener();
}
}
pingNotifiableEventListenerInternal(listener, topic, registration, register);
pingNotifiableEventListenerInternal(service, topic, registration, register);
}
use of com.hazelcast.spi.EventFilter in project hazelcast by hazelcast.
the class NearCachedMapProxyImpl method addNearCacheInvalidateListener.
private void addNearCacheInvalidateListener() {
repairingHandler = mapNearCacheManager.newRepairingHandler(name, nearCache);
EventFilter eventFilter = new UuidFilter(getNodeEngine().getLocalMember().getUuid());
invalidationListenerId = mapServiceContext.addEventListener(new NearCacheInvalidationListener(), eventFilter, name);
}
use of com.hazelcast.spi.EventFilter in project hazelcast by hazelcast.
the class DefaultQueryCache method addEntryListenerInternal.
private String addEntryListenerInternal(MapListener listener, K key, boolean includeValue) {
checkNotNull(listener, "listener cannot be null");
Data keyData = toData(key);
EventFilter filter = new EntryEventFilter(includeValue, keyData);
QueryCacheEventService eventService = getEventService();
String mapName = delegate.getName();
return eventService.addListener(mapName, cacheName, listener, filter);
}
Aggregations