|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventhandling.async.AsynchronousExecutionWrapper<T>
T - The type of object defining the taskpublic abstract class AsynchronousExecutionWrapper<T>
Abstract implementation that schedules tasks for execution. This implementation allows for certain tasks to be executed sequentially, while other (groups of) tasks are processed in parallel.
| Constructor Summary | |
|---|---|
AsynchronousExecutionWrapper(Executor executor,
SequencingPolicy<? super T> sequencingPolicy)
Initialize the AsynchronousExecutionWrapper using the given executor. |
|
AsynchronousExecutionWrapper(Executor executor,
TransactionManager transactionManager,
SequencingPolicy<? super T> sequencingPolicy,
RetryPolicy retryPolicy,
int batchSize,
int retryInterval)
Initialize the AsynchronousExecutionWrapper using the given executor and
transactionManager. |
|
| Method Summary | |
|---|---|
protected abstract void |
doHandle(T task)
Does the actual processing of the task. |
protected EventProcessingScheduler<T> |
newProcessingScheduler(org.axonframework.eventhandling.async.EventProcessingScheduler.ShutdownCallback shutDownCallback)
Creates a new scheduler instance that schedules tasks on the executor service for the managed EventListener. |
protected EventProcessingScheduler<T> |
newProcessingScheduler(org.axonframework.eventhandling.async.EventProcessingScheduler.ShutdownCallback shutDownCallback,
Queue<T> taskQueue)
Creates a new scheduler instance schedules tasks on the executor service for the managed EventListener. |
protected void |
schedule(T task)
Schedules this task for execution when all pre-conditions have been met. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AsynchronousExecutionWrapper(Executor executor,
TransactionManager transactionManager,
SequencingPolicy<? super T> sequencingPolicy,
RetryPolicy retryPolicy,
int batchSize,
int retryInterval)
executor and
transactionManager. The transaction manager is used to start and stop any underlying transactions
necessary for task processing.
executor - The executor that processes the taskstransactionManager - The transaction manager that will manage underlying transactions for this tasksequencingPolicy - The sequencing policy for concurrent execution of tasksretryPolicy - The policy for handling failed eventsbatchSize - The number of events to process in a single batchretryInterval - The number of milliseconds to wait before a retry
public AsynchronousExecutionWrapper(Executor executor,
SequencingPolicy<? super T> sequencingPolicy)
executor.
Note that the underlying bean will not be notified of any transactions.
sequencingPolicy - The sequencing policy for concurrent execution of tasksexecutor - The executor that processes the tasksAsynchronousExecutionWrapper(java.util.concurrent.Executor, SequencingPolicy)| Method Detail |
|---|
protected abstract void doHandle(T task)
task - The task to handleprotected void schedule(T task)
task - The task to schedule for processing.protected EventProcessingScheduler<T> newProcessingScheduler(org.axonframework.eventhandling.async.EventProcessingScheduler.ShutdownCallback shutDownCallback)
shutDownCallback - The callback that needs to be notified when the scheduler stops processing.
protected EventProcessingScheduler<T> newProcessingScheduler(org.axonframework.eventhandling.async.EventProcessingScheduler.ShutdownCallback shutDownCallback,
Queue<T> taskQueue)
taskQueue.
shutDownCallback - The callback that needs to be notified when the scheduler stops processing.taskQueue - The queue from which this scheduler should store and get tasks
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||