| Modifier and Type | Field and Description |
|---|---|
protected CommandContext |
commandContext |
protected List<ExecuteFutureActionOperation<?>> |
futureOperations |
protected LinkedList<Runnable> |
operations |
| Constructor and Description |
|---|
AbstractAgenda(CommandContext commandContext) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
assertOperationsNotEmpty() |
void |
close() |
void |
flush() |
CommandContext |
getCommandContext() |
Runnable |
getNextOperation()
Get next operation from agenda and remove operation from the queue.
|
LinkedList<Runnable> |
getOperations() |
boolean |
isEmpty()
Returns whether there currently are operations planned on the agenda.
|
<V> void |
planFutureOperation(CompletableFuture<V> future,
BiConsumer<V,Throwable> completeAction)
Plan an operation for a future execution
|
void |
planOperation(Runnable operation)
Generic method to plan a
Runnable. |
void |
setCommandContext(CommandContext commandContext) |
protected CommandContext commandContext
protected LinkedList<Runnable> operations
protected List<ExecuteFutureActionOperation<?>> futureOperations
public AbstractAgenda(CommandContext commandContext)
public boolean isEmpty()
Agendapublic Runnable getNextOperation()
AgendagetNextOperation in interface AgendaFlowableException in the case when agenda is emptyprotected void assertOperationsNotEmpty()
public void planOperation(Runnable operation)
Runnable.planOperation in interface Agendaoperation - operation to runpublic <V> void planFutureOperation(CompletableFuture<V> future, BiConsumer<V,Throwable> completeAction)
AgendaplanFutureOperation in interface AgendaV - the type of the value the future returnsfuture - the future that will return the valuecompleteAction - the action that should be invoked once the future completespublic LinkedList<Runnable> getOperations()
public CommandContext getCommandContext()
public void setCommandContext(CommandContext commandContext)
Copyright © 2021 Flowable. All rights reserved.