Package org.voltdb.task
Interface ActionScheduler
- All Superinterfaces:
Initializable
public interface ActionScheduler
Interface which generates actions to be performed as well as calculating the interval that should elapse before the
action is performed.
-
Method Summary
Modifier and TypeMethodDescriptionThis method is invoked only once to obtain the first action and interval.default booleanReturnfalseunless it is guaranteed that all procedures are also read only.default booleanIf this method returnstruethat 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
-
getFirstScheduledAction
ScheduledAction getFirstScheduledAction()This method is invoked only once to obtain the first action and interval. The action will be performed after the provided time interval has elapsed. After the action has been performed thecallbackwill be invoked with theresultof the action. The return of the callback will be used as the next action and interval.If this method throws an exception or returns
nullthe task instance will halted and put into an error state.- Returns:
ScheduledActionwith the action and interval after which the action is performed
-
restrictProcedureByScope
default boolean restrictProcedureByScope()If this method returnstruethat 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:
trueif the type of procedure this scheduler can run should be restricted based upon scope
-
isReadOnly
default boolean isReadOnly()Returnfalseunless it is guaranteed that all procedures are also read only.- Returns:
trueif all procedures returned by this instance are read only
-