public interface Cluster extends EventProcessingMonitorSupport
ClusteringEventBus
. This allows attributes and behavior (e.g. transaction management, asynchronous processing,
distribution) to be applied over a whole group at once.Modifier and Type | Method and Description |
---|---|
Set<EventListener> |
getMembers()
Returns a read-only view on the members in the cluster.
|
ClusterMetaData |
getMetaData()
Returns the MetaData of this Cluster.
|
String |
getName()
Returns the name of this cluster.
|
void |
publish(EventMessage... events)
Publishes the given Events to the members of this cluster.
|
void |
subscribe(EventListener eventListener)
Subscribe the given
eventListener to this cluster. |
void |
unsubscribe(EventListener eventListener)
Unsubscribes the given
eventListener from this cluster. |
subscribeEventProcessingMonitor, unsubscribeEventProcessingMonitor
String getName()
void publish(EventMessage... events)
EventListeners
are
discouraged to throw exceptions, it is possible that they are propagated through this method invocation. In that
case, no guarantees can be given about the delivery of Events at all Cluster members.events
- The Events to publish in the clustervoid subscribe(EventListener eventListener)
eventListener
to this cluster. If the listener is already subscribed, nothing
happens.
While the Event Listeners is subscribed, it will receive all messages published to the cluster.eventListener
- the Event Listener instance to subscribevoid unsubscribe(EventListener eventListener)
eventListener
from this cluster. If the listener is already unsubscribed, or was
never subscribed, nothing happens.eventListener
- the Event Listener instance to unsubscribeSet<EventListener> getMembers()
ClusterMetaData getMetaData()
Copyright © 2010-2014. All Rights Reserved.