|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface EventService
Component responsible for handling events like topic events or map.listener events.
Method Summary | |
---|---|
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. |
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. |
Method Detail |
---|
int getEventThreadCount()
GroupProperties.PROP_EVENT_THREAD_COUNT
int getEventQueueCapacity()
GroupProperties.PROP_EVENT_QUEUE_CAPACITY
int getEventQueueSize()
EventRegistration registerLocalListener(String serviceName, String topic, Object listener)
serviceName
- service nametopic
- topic namelistener
- listener instance
EventRegistration registerLocalListener(String serviceName, String topic, EventFilter filter, Object listener)
serviceName
- service nametopic
- topic namefilter
- event filterlistener
- listener instance
EventRegistration registerListener(String serviceName, String topic, Object listener)
serviceName
- service nametopic
- topic namelistener
- listener instance
EventRegistration registerListener(String serviceName, String topic, EventFilter filter, Object listener)
serviceName
- service nametopic
- topic namefilter
- event filterlistener
- listener instance
boolean deregisterListener(String serviceName, String topic, Object id)
serviceName
- service nametopic
- topic nameid
- registration id
EventRegistration.getId()
,
registerListener(String, String, Object)
,
registerLocalListener(String, String, Object)
void deregisterAllListeners(String serviceName, String topic)
serviceName
- service nametopic
- topic nameCollection<EventRegistration> getRegistrations(String serviceName, String topic)
serviceName
- service nametopic
- topic name
EventRegistration[] getRegistrationsAsArray(String serviceName, String topic)
serviceName
- service nametopic
- topic name
boolean hasEventRegistration(String serviceName, String topic)
serviceName
- service nametopic
- topic name
void publishEvent(String serviceName, String topic, Object event, int orderKey)
serviceName
- service nametopic
- topic nameevent
- event objectorderKey
- order keyvoid publishEvent(String serviceName, EventRegistration registration, Object event, int orderKey)
serviceName
- service nameregistration
- event registrationevent
- event objectorderKey
- order keyvoid publishEvent(String serviceName, Collection<EventRegistration> registrations, Object event, int orderKey)
serviceName
- service nameregistrations
- multiple event registrationsevent
- event objectorderKey
- order keyvoid executeEventCallback(Runnable callback)
If callback
is an instance of StripedRunnable
,
then StripedRunnable.getKey()
will be used as order key
to pick event thread.
callback
- callback to executeStripedRunnable
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |