use of com.hazelcast.map.impl.ListenerAdapter in project hazelcast by hazelcast.
the class ClientQueryCacheEventService method addListener.
@Override
public String addListener(String mapName, String cacheName, MapListener listener, EventFilter filter) {
checkHasText(mapName, "mapName");
checkHasText(cacheName, "cacheName");
checkNotNull(listener, "listener cannot be null");
QueryCacheToListenerMapper queryCacheToListenerMapper = getOrPutIfAbsent(registrations, mapName, REGISTRY_CONSTRUCTOR);
ListenerAdapter listenerAdaptor = createQueryCacheListenerAdaptor(listener);
return queryCacheToListenerMapper.addListener(cacheName, listenerAdaptor, filter);
}
use of com.hazelcast.map.impl.ListenerAdapter in project hazelcast by hazelcast.
the class ClientMapProxy method addEntryListener.
@Override
public String addEntryListener(MapListener listener, Predicate<K, V> predicate, boolean includeValue) {
checkNotNull(listener, NULL_LISTENER_IS_NOT_ALLOWED);
checkNotNull(predicate, NULL_PREDICATE_IS_NOT_ALLOWED);
ListenerAdapter listenerAdaptor = createListenerAdapter(listener);
return addEntryListenerInternal(listenerAdaptor, predicate, includeValue);
}
use of com.hazelcast.map.impl.ListenerAdapter in project hazelcast by hazelcast.
the class ClientMapProxy method addEntryListener.
@Override
public String addEntryListener(EntryListener listener, final boolean includeValue) {
checkNotNull(listener, NULL_LISTENER_IS_NOT_ALLOWED);
ListenerAdapter listenerAdaptor = createListenerAdapter(listener);
return addEntryListenerInternal(listenerAdaptor, includeValue);
}
use of com.hazelcast.map.impl.ListenerAdapter in project hazelcast by hazelcast.
the class ClientMapProxy method addEntryListener.
@Override
public String addEntryListener(EntryListener listener, Predicate<K, V> predicate, boolean includeValue) {
checkNotNull(listener, NULL_LISTENER_IS_NOT_ALLOWED);
checkNotNull(predicate, NULL_PREDICATE_IS_NOT_ALLOWED);
ListenerAdapter listenerAdaptor = createListenerAdapter(listener);
return addEntryListenerInternal(listenerAdaptor, predicate, includeValue);
}
use of com.hazelcast.map.impl.ListenerAdapter in project hazelcast by hazelcast.
the class ClientMultiMapProxy method addEntryListener.
@Nonnull
@Override
public UUID addEntryListener(@Nonnull EntryListener<K, V> listener, final boolean includeValue) {
checkNotNull(listener, NULL_LISTENER_IS_NOT_ALLOWED);
ListenerAdapter listenerAdaptor = createListenerAdapter(listener);
EventHandler<ClientMessage> handler = new ClientMultiMapEventHandler(listenerAdaptor);
return registerListener(createEntryListenerCodec(includeValue), handler);
}
Aggregations