public class EventServiceImpl extends Object implements EventService
| Modifier and Type | Class and Description |
|---|---|
static class |
EventServiceImpl.DeregistrationOperation |
static class |
EventServiceImpl.EmptyFilter |
static class |
EventServiceImpl.EventPacket |
static class |
EventServiceImpl.PostJoinRegistrationOperation |
static class |
EventServiceImpl.Registration |
static class |
EventServiceImpl.RegistrationOperation |
static class |
EventServiceImpl.SendEventOperation |
| Modifier and Type | Method and Description |
|---|---|
void |
deregisterAllListeners(String serviceName,
String topic)
Deregisters all listeners belonging to the given service and topic.
|
boolean |
deregisterListener(String serviceName,
String topic,
Object id)
Deregisters a listener with given registration id.
|
void |
executeEventCallback(Runnable callback)
Executes an event callback on a random event thread.
|
int |
getEventQueueCapacity()
Returns queue capacity per event thread.
|
int |
getEventQueueSize()
Returns current total event queue size.
|
int |
getEventThreadCount()
Returns event thread count.
|
EventServiceImpl.PostJoinRegistrationOperation |
getPostJoinOperation() |
Collection<EventRegistration> |
getRegistrations(String serviceName,
String topic)
Returns all registrations belonging to the given service and topic.
|
EventRegistration[] |
getRegistrationsAsArray(String serviceName,
String topic)
Returns all registrations belonging to the given service and topic as an array.
|
boolean |
hasEventRegistration(String serviceName,
String topic)
Returns true if a listener is registered with specified service name and topic.
|
void |
publishEvent(String serviceName,
Collection<EventRegistration> registrations,
Object event,
int orderKey)
Publishes an event for multiple event registrations.
|
void |
publishEvent(String serviceName,
EventRegistration registration,
Object event,
int orderKey)
Publishes an event for a specific event registration.
|
void |
publishEvent(String serviceName,
String topic,
Object event,
int orderKey)
Publishes an event for all event registrations belonging to specified service name and topic.
|
EventRegistration |
registerListener(String serviceName,
String topic,
EventFilter filter,
Object listener)
Registers a listener on all cluster nodes.
|
EventRegistration |
registerListener(String serviceName,
String topic,
Object listener)
Registers a listener on all cluster nodes.
|
EventRegistration |
registerLocalListener(String serviceName,
String topic,
EventFilter filter,
Object listener)
Registers a local only listener.
|
EventRegistration |
registerLocalListener(String serviceName,
String topic,
Object listener)
Registers a local only listener.
|
public int getEventThreadCount()
EventServicegetEventThreadCount in interface EventServiceGroupProperties.PROP_EVENT_THREAD_COUNTpublic int getEventQueueCapacity()
EventServicegetEventQueueCapacity in interface EventServiceGroupProperties.PROP_EVENT_QUEUE_CAPACITYpublic int getEventQueueSize()
EventServicegetEventQueueSize in interface EventServicepublic EventRegistration registerLocalListener(String serviceName, String topic, Object listener)
EventServiceregisterLocalListener in interface EventServiceserviceName - service nametopic - topic namelistener - listener instancepublic EventRegistration registerLocalListener(String serviceName, String topic, EventFilter filter, Object listener)
EventServiceregisterLocalListener in interface EventServiceserviceName - service nametopic - topic namefilter - event filterlistener - listener instancepublic EventRegistration registerListener(String serviceName, String topic, Object listener)
EventServiceregisterListener in interface EventServiceserviceName - service nametopic - topic namelistener - listener instancepublic EventRegistration registerListener(String serviceName, String topic, EventFilter filter, Object listener)
EventServiceregisterListener in interface EventServiceserviceName - service nametopic - topic namefilter - event filterlistener - listener instancepublic boolean deregisterListener(String serviceName, String topic, Object id)
EventServicederegisterListener in interface EventServiceserviceName - service nametopic - topic nameid - registration idEventRegistration.getId(),
EventService.registerListener(String, String, Object),
EventService.registerLocalListener(String, String, Object)public void deregisterAllListeners(String serviceName, String topic)
EventServicederegisterAllListeners in interface EventServiceserviceName - service nametopic - topic namepublic EventRegistration[] getRegistrationsAsArray(String serviceName, String topic)
EventServicegetRegistrationsAsArray in interface EventServiceserviceName - service nametopic - topic namepublic Collection<EventRegistration> getRegistrations(String serviceName, String topic)
EventServicegetRegistrations in interface EventServiceserviceName - service nametopic - topic namepublic boolean hasEventRegistration(String serviceName, String topic)
EventServicehasEventRegistration in interface EventServiceserviceName - service nametopic - topic namepublic void publishEvent(String serviceName, String topic, Object event, int orderKey)
EventServicepublishEvent in interface EventServiceserviceName - service nametopic - topic nameevent - event objectorderKey - order keypublic void publishEvent(String serviceName, EventRegistration registration, Object event, int orderKey)
EventServicepublishEvent in interface EventServiceserviceName - service nameregistration - event registrationevent - event objectorderKey - order keypublic void publishEvent(String serviceName, Collection<EventRegistration> registrations, Object event, int orderKey)
EventServicepublishEvent in interface EventServiceserviceName - service nameregistrations - multiple event registrationsevent - event objectorderKey - order keypublic void executeEventCallback(Runnable callback)
EventService
If callback is an instance of StripedRunnable,
then StripedRunnable.getKey() will be used as order key
to pick event thread.
executeEventCallback in interface EventServicecallback - callback to executeStripedRunnablepublic EventServiceImpl.PostJoinRegistrationOperation getPostJoinOperation()
Copyright © 2015 Hazelcast, Inc.. All Rights Reserved.