|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventhandling.AbstractCluster
org.axonframework.eventhandling.async.AsynchronousCluster
public class AsynchronousCluster
Cluster implementation that publishes events to the subscribed Event Listeners asynchronously from the publishing thread. This implementation can be configured to retry event when processing fails. Furthermore, a SequencingPolicy will tell the cluster which Events need to be processed sequentially, and which may be processed in parallel from others.
SequencingPolicy,
TransactionManager| Constructor Summary | |
|---|---|
AsynchronousCluster(String identifier,
Executor executor,
TransactionManager transactionManager,
SequencingPolicy<? super EventMessage<?>> sequencingPolicy)
Creates an AsynchronousCluster implementation using the given executor,
transactionManager and sequencingPolicy. |
|
AsynchronousCluster(String identifier,
Executor executor,
TransactionManager transactionManager,
SequencingPolicy<? super EventMessage<?>> sequencingPolicy,
int batchSize,
RetryPolicy retryPolicy,
int retryInterval)
Creates an AsynchronousCluster implementation using the given executor,
transactionManager and sequencingPolicy. |
|
| Method Summary | |
|---|---|
protected void |
doPublish(EventMessage<?> message)
Performs the actual publication of the message to each of the event handlers. |
void |
publish(EventMessage... events)
Publishes the given Events to the members of this cluster. |
| Methods inherited from class org.axonframework.eventhandling.AbstractCluster |
|---|
getMembers, getMetaData, getName, subscribe, unsubscribe |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsynchronousCluster(String identifier,
Executor executor,
TransactionManager transactionManager,
SequencingPolicy<? super EventMessage<?>> sequencingPolicy)
executor,
transactionManager and sequencingPolicy. Failed events are retried if they are not
explicitly non-transient with an interval of 2000 millis. Batch size is 50 events.
identifier - The unique identifier of this clusterexecutor - The executor to process event batches withtransactionManager - The TransactionManager that manages transactions around event processing batchessequencingPolicy - The policy indicating which events must be processed sequentially, and which may be
executed in parallel.
public AsynchronousCluster(String identifier,
Executor executor,
TransactionManager transactionManager,
SequencingPolicy<? super EventMessage<?>> sequencingPolicy,
int batchSize,
RetryPolicy retryPolicy,
int retryInterval)
executor,
transactionManager and sequencingPolicy. Failure is processed according to the given
retryPolicy and retryInterval. Processors will process at most batchSize
events in a single batch.
identifier - The unique identifier of this clusterexecutor - The executor to process event batches withtransactionManager - The TransactionManager that manages transactions around event processing batchessequencingPolicy - The policy indicating which events must be processed sequentially, and which may be
executed in parallel.batchSize - The number of events to process in a single batch (and transaction)retryPolicy - The policy to apply when event handling failsretryInterval - The time (in milliseconds) to wait between retries| Method Detail |
|---|
public void publish(EventMessage... events)
ClusterEventListeners 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 clusterprotected void doPublish(EventMessage<?> message)
message - The message to publish to each of the handlers
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||