Collection<EventRegistration> registrations = eventService.getRegistrations(getServiceName(), name);
return registrations.size() > 0;
}
public void publishEvent(ItemEventType eventType, Data data) {
EventService eventService = getNodeEngine().getEventService();
Collection<EventRegistration> registrations = eventService.getRegistrations(getServiceName(), name);
Address thisAddress = getNodeEngine().getThisAddress();
for (EventRegistration registration : registrations) {
QueueEventFilter filter = (QueueEventFilter) registration.getFilter();
QueueEvent event = new QueueEvent(name, filter.isIncludeValue() ? data : null, eventType, thisAddress);
eventService.publishEvent(getServiceName(), registration, event, name.hashCode());
}
}