Class CommonAgenda
- java.lang.Object
-
- org.flowable.common.engine.impl.agenda.CommonAgenda
-
-
Field Summary
Fields Modifier and Type Field Description protected List<ExecuteFutureActionOperation<?>>futureOperationsprotected org.slf4j.Loggerloggerprotected AgendaOperationDecoratoroperationDecoratorprotected LinkedList<Runnable>operations
-
Constructor Summary
Constructors Constructor Description CommonAgenda()CommonAgenda(AgendaOperationDecorator operationDecorator)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidassertOperationsNotEmpty()voidclose()voidflush()RunnablegetNextOperation()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 Detail
-
logger
protected final org.slf4j.Logger logger
-
operationDecorator
protected final AgendaOperationDecorator operationDecorator
-
operations
protected final LinkedList<Runnable> operations
-
futureOperations
protected final List<ExecuteFutureActionOperation<?>> futureOperations
-
-
Constructor Detail
-
CommonAgenda
public CommonAgenda()
-
CommonAgenda
public CommonAgenda(AgendaOperationDecorator operationDecorator)
-
-
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)
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
-
-