Interface Agenda
-
- All Superinterfaces:
Session
- All Known Implementing Classes:
AbstractAgenda,CommonAgenda
public interface Agenda extends Session
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description 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
-
-
-
Method Detail
-
isEmpty
boolean isEmpty()
Returns whether there currently are operations planned on the agenda.
-
getNextOperation
Runnable getNextOperation()
Get next operation from agenda and remove operation from the queue.- Returns:
- next operation from the queue
throws
FlowableExceptionin the case when agenda is empty
-
planOperation
void planOperation(Runnable operation)
Plan operation for execution- Parameters:
operation- operation to run
-
planFutureOperation
<V> void planFutureOperation(CompletableFuture<V> future, BiConsumer<V,Throwable> completeAction)
Plan an operation for a future execution- 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
-
-