use of com.hazelcast.collection.impl.queue.QueueEvent in project hazelcast by hazelcast.
the class QueueOperation method publishEvent.
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());
}
}
Aggregations