|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.axonframework.eventhandling.async.EventProcessingScheduler<T>
T - The type of class representing the processing instruction for the event.public abstract class EventProcessingScheduler<T>
Scheduler that keeps track of (Event processing) tasks that need to be executed sequentially.
| Constructor Summary | |
|---|---|
EventProcessingScheduler(TransactionManager transactionManager,
Executor executor,
org.axonframework.eventhandling.async.EventProcessingScheduler.ShutdownCallback shutDownCallback,
RetryPolicy retryPolicy,
int batchSize,
int retryInterval)
Initialize a scheduler using the given executor. |
|
EventProcessingScheduler(TransactionManager transactionManager,
Queue<T> eventQueue,
Executor executor,
org.axonframework.eventhandling.async.EventProcessingScheduler.ShutdownCallback shutDownCallback,
RetryPolicy retryPolicy,
int batchSize,
int retryInterval)
Initialize a scheduler using the given executor. |
|
| Method Summary | |
|---|---|
protected abstract void |
doHandle(T event)
Does the actual processing of the event. |
void |
run()
|
boolean |
scheduleEvent(T event)
Schedules an event for processing. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EventProcessingScheduler(TransactionManager transactionManager,
Executor executor,
org.axonframework.eventhandling.async.EventProcessingScheduler.ShutdownCallback shutDownCallback,
RetryPolicy retryPolicy,
int batchSize,
int retryInterval)
executor. This scheduler uses an unbounded queue to schedule
events.
transactionManager - The transaction manager that manages underlying transactionsexecutor - The executor service that will process the eventsshutDownCallback - The callback to notify when the scheduler finishes processing eventsretryPolicy - The policy indicating how to deal with event processing failurebatchSize - The number of events to process in a single batchretryInterval - The number of milliseconds to wait between retries
public EventProcessingScheduler(TransactionManager transactionManager,
Queue<T> eventQueue,
Executor executor,
org.axonframework.eventhandling.async.EventProcessingScheduler.ShutdownCallback shutDownCallback,
RetryPolicy retryPolicy,
int batchSize,
int retryInterval)
executor. The eventQueue is the queue from
which the scheduler should obtain it's events. This queue does not have to be thread safe, if the queue is not
accessed from outside the EventProcessingScheduler.
transactionManager - The transaction manager that manages underlying transactionsexecutor - The executor service that will process the eventseventQueue - The queue from which this scheduler gets eventsshutDownCallback - The callback to notify when the scheduler finishes processing eventsretryPolicy - The policy indicating how to deal with event processing failurebatchSize - The number of events to process in a single batchretryInterval - The number of milliseconds to wait between retries| Method Detail |
|---|
public boolean scheduleEvent(T event)
event - the event to schedule
IllegalStateException - if the queue in this scheduler does not have the capacity to add this eventpublic void run()
run in interface Runnableprotected abstract void doHandle(T event)
event - The event to handle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||