Class AbstractAgenda
- java.lang.Object
-
- org.flowable.common.engine.impl.agenda.AbstractAgenda
-
-
Field Summary
Fields Modifier and Type Field Description protected CommandContextcommandContextprotected List<ExecuteFutureActionOperation<?>>futureOperationsprotected LinkedList<Runnable>operations
-
Constructor Summary
Constructors Constructor Description AbstractAgenda(CommandContext commandContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertOperationsNotEmpty()voidclose()voidflush()CommandContextgetCommandContext()RunnablegetNextOperation()Get next operation from agenda and remove operation from the queue.LinkedList<Runnable>getOperations()booleanisEmpty()Returns whether there currently are operations planned on the agenda.<V> voidplanFutureOperation(CompletableFuture<V> future, BiConsumer<V,Throwable> completeAction)Plan an operation for a future executionvoidplanOperation(Runnable operation)Generic method to plan aRunnable.voidsetCommandContext(CommandContext commandContext)
-
-
-
Field Detail
-
commandContext
protected CommandContext commandContext
-
operations
protected LinkedList<Runnable> operations
-
futureOperations
protected List<ExecuteFutureActionOperation<?>> futureOperations
-
-
Constructor Detail
-
AbstractAgenda
public AbstractAgenda(CommandContext commandContext)
-
-
Method Detail
-
isEmpty
public boolean isEmpty()
Description copied from interface:AgendaReturns whether there currently are operations planned on the agenda.
-
getNextOperation
public Runnable getNextOperation()
Description copied from interface:AgendaGet next operation from agenda and remove operation from the queue.- Specified by:
getNextOperationin interfaceAgenda- Returns:
- next operation from the queue
throws
FlowableExceptionin the case when agenda is empty
-
assertOperationsNotEmpty
protected void assertOperationsNotEmpty()
-
planOperation
public void planOperation(Runnable operation)
Generic method to plan aRunnable.- Specified by:
planOperationin interfaceAgenda- Parameters:
operation- operation to run
-
planFutureOperation
public <V> void planFutureOperation(CompletableFuture<V> future, BiConsumer<V,Throwable> completeAction)
Description copied from interface:AgendaPlan an operation for a future execution- Specified by:
planFutureOperationin interfaceAgenda- Type Parameters:
V- the type of the value the future returns- Parameters:
future- the future that will return the valuecompleteAction- the action that should be invoked once the future completes
-
getOperations
public LinkedList<Runnable> getOperations()
-
getCommandContext
public CommandContext getCommandContext()
-
setCommandContext
public void setCommandContext(CommandContext commandContext)
-
-