|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.hazelcast.spi.impl.EventServiceImpl
public class EventServiceImpl
Nested Class Summary | |
---|---|
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
|
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. |
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int getEventThreadCount()
EventService
getEventThreadCount
in interface EventService
GroupProperties.PROP_EVENT_THREAD_COUNT
public int getEventQueueCapacity()
EventService
getEventQueueCapacity
in interface EventService
GroupProperties.PROP_EVENT_QUEUE_CAPACITY
public int getEventQueueSize()
EventService
getEventQueueSize
in interface EventService
public EventRegistration registerLocalListener(String serviceName, String topic, Object listener)
EventService
registerLocalListener
in interface EventService
serviceName
- service nametopic
- topic namelistener
- listener instance
public EventRegistration registerLocalListener(String serviceName, String topic, EventFilter filter, Object listener)
EventService
registerLocalListener
in interface EventService
serviceName
- service nametopic
- topic namefilter
- event filterlistener
- listener instance
public EventRegistration registerListener(String serviceName, String topic, Object listener)
EventService
registerListener
in interface EventService
serviceName
- service nametopic
- topic namelistener
- listener instance
public EventRegistration registerListener(String serviceName, String topic, EventFilter filter, Object listener)
EventService
registerListener
in interface EventService
serviceName
- service nametopic
- topic namefilter
- event filterlistener
- listener instance
public boolean deregisterListener(String serviceName, String topic, Object id)
EventService
deregisterListener
in interface EventService
serviceName
- service nametopic
- topic nameid
- registration id
EventRegistration.getId()
,
EventService.registerListener(String, String, Object)
,
EventService.registerLocalListener(String, String, Object)
public void deregisterAllListeners(String serviceName, String topic)
EventService
deregisterAllListeners
in interface EventService
serviceName
- service nametopic
- topic namepublic EventRegistration[] getRegistrationsAsArray(String serviceName, String topic)
EventService
getRegistrationsAsArray
in interface EventService
serviceName
- service nametopic
- topic name
public Collection<EventRegistration> getRegistrations(String serviceName, String topic)
EventService
getRegistrations
in interface EventService
serviceName
- service nametopic
- topic name
public boolean hasEventRegistration(String serviceName, String topic)
EventService
hasEventRegistration
in interface EventService
serviceName
- service nametopic
- topic name
public void publishEvent(String serviceName, String topic, Object event, int orderKey)
EventService
publishEvent
in interface EventService
serviceName
- service nametopic
- topic nameevent
- event objectorderKey
- order keypublic void publishEvent(String serviceName, EventRegistration registration, Object event, int orderKey)
EventService
publishEvent
in interface EventService
serviceName
- service nameregistration
- event registrationevent
- event objectorderKey
- order keypublic void publishEvent(String serviceName, Collection<EventRegistration> registrations, Object event, int orderKey)
EventService
publishEvent
in interface EventService
serviceName
- 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 EventService
callback
- callback to executeStripedRunnable
public EventServiceImpl.PostJoinRegistrationOperation getPostJoinOperation()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |