Interface ActionGenerator

All Superinterfaces:
Initializable

public interface ActionGenerator
Interface which generates actions to be be performed as part of a task on a schedule
  • Method Summary

    Modifier and Type
    Method
    Description
    This method is invoked only once to obtain the first action.
    default boolean
    Return false unless it is guaranteed that all procedures are also read only.
    default boolean
    If this method returns true that means the type of procedure which this scheduler can run is restricted based upon the scope type.

    Methods inherited from interface org.voltdb.task.Initializable

    getDependencies
  • Method Details

    • getFirstAction

      Action getFirstAction()
      This method is invoked only once to obtain the first action. The first action will be performed after a time interval has elapsed. After the action has been performed callback will be invoked with the result of this action. The return of the callback will be used as the next action.

      If this method throws an exception or returns null the task instance will halted and put into an error state.

      Returns:
      Action to perform
    • restrictProcedureByScope

      default boolean restrictProcedureByScope()
      If this method returns true that means the type of procedure which this scheduler can run is restricted based upon the scope type.
      • SYSTEM - Cannot run single partition procedures
      • HOSTS - Only NT procedures are allowed
      • PARTITIONS - Only partitioned procedures are allowed

      Default return is false

      Returns:
      true if the type of procedure this scheduler can run should be restricted based upon scope
    • isReadOnly

      default boolean isReadOnly()
      Return false unless it is guaranteed that all procedures are also read only.
      Returns:
      true if all procedures returned by this instance are read only