Package org.voltdb.task
Class CompositeActionScheduler
java.lang.Object
org.voltdb.task.CompositeActionScheduler
- All Implemented Interfaces:
ActionScheduler,Initializable
Simple
ActionScheduler implementation which takes a ActionGenerator and IntervalGenerator and
combines the results of those two instances to make a ScheduledAction-
Constructor Summary
ConstructorsConstructorDescriptionCompositeActionScheduler(ActionGenerator actionGenerator, IntervalGenerator intervalGenerator) -
Method Summary
Modifier and TypeMethodDescriptionThis method is invoked only once to obtain the first action and interval.booleanbooleanMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.voltdb.task.Initializable
getDependencies
-
Constructor Details
-
CompositeActionScheduler
public CompositeActionScheduler(ActionGenerator actionGenerator, IntervalGenerator intervalGenerator)
-
-
Method Details
-
getFirstScheduledAction
Description copied from interface:ActionSchedulerThis 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.- Specified by:
getFirstScheduledActionin interfaceActionScheduler- Returns:
ScheduledActionwith the action and interval after which the action is performed
-
restrictProcedureByScope
public boolean restrictProcedureByScope() -
isReadOnly
public boolean isReadOnly()
-