Class AbstractAgenda
java.lang.Object
org.flowable.common.engine.impl.agenda.AbstractAgenda
- Author:
- Joram Barrez
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected CommandContextprotected List<ExecuteFutureActionOperation<?>>protected LinkedList<Runnable> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidclose()voidflush()protected abstract AgendaFutureMaxWaitTimeoutProviderprotected DurationGet next operation from agenda and remove operation from the queue.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 Details
-
commandContext
-
operations
-
futureOperations
-
-
Constructor Details
-
AbstractAgenda
-
-
Method Details
-
isEmpty
public boolean isEmpty()Description copied from interface:AgendaReturns whether there currently are operations planned on the agenda. -
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
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
-
getFutureMaxWaitTimeout
-
getOperations
-
getCommandContext
-
setCommandContext
-
getAgendaFutureMaxWaitTimeoutProvider
-
flush
public void flush() -
close
public void close()
-