|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Cluster
A cluster represents a group of Event Listeners that are treated as a single group by the ClusteringEventBus
. This allows attributes and behavior (e.g. transaction management, asynchronous processing,
distribution) to be applied over a whole group at once.
Method Summary | |
---|---|
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. |
Methods inherited from interface org.axonframework.eventhandling.EventProcessingMonitorSupport |
---|
subscribeEventProcessingMonitor, unsubscribeEventProcessingMonitor |
Method Detail |
---|
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()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |