use of com.hazelcast.spi.impl.eventservice.impl.Registration in project hazelcast by hazelcast.
the class NodeQueryCacheEventService method hasListener.
@Override
public boolean hasListener(String mapName, String cacheName) {
String listenerName = generateListenerName(mapName, cacheName);
Collection<EventRegistration> eventRegistrations = getRegistrations(listenerName);
if (eventRegistrations.isEmpty()) {
return false;
}
for (EventRegistration eventRegistration : eventRegistrations) {
Registration registration = (Registration) eventRegistration;
Object listener = registration.getListener();
if (listener instanceof QueryCacheListenerAdapter) {
return true;
}
}
return false;
}
use of com.hazelcast.spi.impl.eventservice.impl.Registration in project hazelcast by hazelcast.
the class RegistrationOperation method readInternal.
@Override
protected void readInternal(ObjectDataInput in) throws IOException {
registration = new Registration();
registration.readData(in);
}
Aggregations