Class CommonAgenda
java.lang.Object
org.flowable.common.engine.impl.agenda.CommonAgenda
- Author:
- Filip Hrisafov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<ExecuteFutureActionOperation<?>>protected final org.slf4j.Loggerprotected final AgendaOperationDecoratorprotected final LinkedList<Runnable> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidvoidclose()voidflush()Get 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) Plan operation for execution
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
operationDecorator
-
operations
-
futureOperations
-
-
Constructor Details
-
CommonAgenda
public CommonAgenda() -
CommonAgenda
-
-
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
Description copied from interface:AgendaPlan operation for execution- 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
-
flush
public void flush() -
close
public void close()
-