Class AbstractAgenda

java.lang.Object
org.flowable.common.engine.impl.agenda.AbstractAgenda
All Implemented Interfaces:
Agenda, Session

public abstract class AbstractAgenda extends Object implements Agenda
Author:
Joram Barrez
  • Field Details

  • Constructor Details

    • AbstractAgenda

      public AbstractAgenda(CommandContext commandContext)
  • Method Details

    • isEmpty

      public boolean isEmpty()
      Description copied from interface: Agenda
      Returns whether there currently are operations planned on the agenda.
      Specified by:
      isEmpty in interface Agenda
    • getNextOperation

      public Runnable getNextOperation()
      Description copied from interface: Agenda
      Get next operation from agenda and remove operation from the queue.
      Specified by:
      getNextOperation in interface Agenda
      Returns:
      next operation from the queue throws FlowableException in the case when agenda is empty
    • assertOperationsNotEmpty

      protected void assertOperationsNotEmpty()
    • planOperation

      public void planOperation(Runnable operation)
      Generic method to plan a Runnable.
      Specified by:
      planOperation in interface Agenda
      Parameters:
      operation - operation to run
    • planFutureOperation

      public <V> void planFutureOperation(CompletableFuture<V> future, BiConsumer<V,Throwable> completeAction)
      Description copied from interface: Agenda
      Plan an operation for a future execution
      Specified by:
      planFutureOperation in interface Agenda
      Type Parameters:
      V - the type of the value the future returns
      Parameters:
      future - the future that will return the value
      completeAction - the action that should be invoked once the future completes
    • getFutureMaxWaitTimeout

      protected Duration getFutureMaxWaitTimeout()
    • getOperations

      public LinkedList<Runnable> getOperations()
    • getCommandContext

      public CommandContext getCommandContext()
    • setCommandContext

      public void setCommandContext(CommandContext commandContext)
    • getAgendaFutureMaxWaitTimeoutProvider

      protected abstract AgendaFutureMaxWaitTimeoutProvider getAgendaFutureMaxWaitTimeoutProvider()
    • flush

      public void flush()
      Specified by:
      flush in interface Session
    • close

      public void close()
      Specified by:
      close in interface Session