use of com.hazelcast.spi.impl.eventservice.EventService in project hazelcast by hazelcast.
the class AbstractCacheRecordStore method closeListeners.
protected void closeListeners() {
EventService eventService = cacheService.getNodeEngine().getEventService();
Collection<EventRegistration> candidates = eventService.getRegistrations(ICacheService.SERVICE_NAME, name);
for (EventRegistration eventRegistration : candidates) {
eventService.close(eventRegistration);
}
}
use of com.hazelcast.spi.impl.eventservice.EventService in project hazelcast by hazelcast.
the class AbstractCacheService method registerListener.
@Override
public UUID registerListener(String cacheNameWithPrefix, CacheEventListener listener) {
EventService eventService = getNodeEngine().getEventService();
EventRegistration registration = eventService.registerListener(AbstractCacheService.SERVICE_NAME, cacheNameWithPrefix, listener);
return updateRegisteredListeners(listener, registration);
}
use of com.hazelcast.spi.impl.eventservice.EventService in project hazelcast by hazelcast.
the class AbstractCacheService method registerLocalListener.
@Override
public UUID registerLocalListener(String cacheNameWithPrefix, CacheEventListener listener, EventFilter eventFilter) {
EventService eventService = getNodeEngine().getEventService();
EventRegistration registration = eventService.registerLocalListener(AbstractCacheService.SERVICE_NAME, cacheNameWithPrefix, eventFilter, listener);
if (registration == null) {
return null;
}
return updateRegisteredListeners(listener, registration);
}
use of com.hazelcast.spi.impl.eventservice.EventService in project hazelcast by hazelcast.
the class AbstractCacheService method deregisterAllListener.
@Override
public void deregisterAllListener(String cacheNameWithPrefix) {
EventService eventService = getNodeEngine().getEventService();
Collection<EventRegistration> registrations = eventService.getRegistrations(SERVICE_NAME, cacheNameWithPrefix);
if (registrations != null) {
for (EventRegistration registration : registrations) {
removeFromLocalResources(registration.getId());
}
}
eventService.deregisterAllListeners(AbstractCacheService.SERVICE_NAME, cacheNameWithPrefix);
CacheContext cacheContext = cacheContexts.get(cacheNameWithPrefix);
if (cacheContext != null) {
cacheContext.resetCacheEntryListenerCount();
cacheContext.resetInvalidationListenerCount();
}
}
use of com.hazelcast.spi.impl.eventservice.EventService in project hazelcast by hazelcast.
the class ClientServiceProxy method removeClientListener.
@Override
public boolean removeClientListener(@Nonnull UUID registrationId) {
checkNotNull(registrationId, "registrationId should not be null");
EventService eventService = nodeEngine.getEventService();
return eventService.deregisterListener(ClientEngineImpl.SERVICE_NAME, ClientEngineImpl.SERVICE_NAME, registrationId);
}
Aggregations