|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventhandling.AbstractCluster
public abstract class AbstractCluster
Abstract Cluster implementation that keeps track of Cluster members (EventListeners).
This implementation is thread-safe. The getMembers() method returns a read-only runtime view of the members
in the cluster.
| Constructor Summary | |
|---|---|
protected |
AbstractCluster(String name)
Initializes the cluster with given name. |
| 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 |
subscribe(EventListener eventListener)
Subscribe the given eventListener to this cluster. |
void |
unsubscribe(EventListener eventListener)
Unsubscribes the given eventListener from this cluster. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.axonframework.eventhandling.Cluster |
|---|
publish |
| Constructor Detail |
|---|
protected AbstractCluster(String name)
name.
name - The name of this cluster| Method Detail |
|---|
public String getName()
Cluster
getName in interface Clusterpublic void subscribe(EventListener eventListener)
ClustereventListener 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.
subscribe in interface ClustereventListener - the Event Listener instance to subscribepublic void unsubscribe(EventListener eventListener)
ClustereventListener from this cluster. If the listener is already unsubscribed, or was
never subscribed, nothing happens.
unsubscribe in interface ClustereventListener - the Event Listener instance to unsubscribepublic ClusterMetaData getMetaData()
Cluster
getMetaData in interface Clusterpublic Set<EventListener> getMembers()
Iterator.remove() method to be
invoked.
getMembers in interface Cluster
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||