org.axonframework.eventhandling
Class SimpleCluster
java.lang.Object
org.axonframework.eventhandling.AbstractCluster
org.axonframework.eventhandling.SimpleCluster
- All Implemented Interfaces:
- Cluster
public class SimpleCluster
- extends AbstractCluster
A simple Cluster implementation that invokes each of the members of a cluster when an Event is published. When an
Event Listener raises an exception, publication of the Event is aborted and the exception is propagated. No
guarantees are given about the order of invocation of Event Listeners.
- Since:
- 1.2
- Author:
- ALlard Buijze
|
Method Summary |
void |
publish(EventMessage... events)
Publishes the given Events to the members of this cluster. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimpleCluster
public SimpleCluster(String name)
- Initializes the cluster with given
name.
- Parameters:
name - The name of this cluster
publish
public void publish(EventMessage... events)
- Description copied from interface:
Cluster
- Publishes the given Events to the members of this cluster.
Implementations may do this synchronously or asynchronously. Although
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.
- Parameters:
events - The Events to publish in the cluster
Copyright © 2010-2012. All Rights Reserved.