Package org.voltdb.task
Class IntervalIntervalGenerator
java.lang.Object
org.voltdb.task.IntervalIntervalGenerator
- All Implemented Interfaces:
Initializable,IntervalGenerator
A
IntervalGenerator which tries to execute actions with a fixed amount of time between action start times-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThis method is invoked only once to obtain the first interval.voidinitialize(TaskHelper helper, int interval, String timeUnit) static StringvalidateParameters(TaskHelper arg0, int arg1, String arg2) Methods 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
-
IntervalIntervalGenerator
public IntervalIntervalGenerator()
-
-
Method Details
-
initialize
-
getFirstInterval
Description copied from interface:IntervalGeneratorThis method is invoked only once to obtain the first interval. The first action will be performed after this time interval has elapsed. After the action has been performedcallbackwill be invoked with theresultof the action. The return of the callback will be used as the next interval.If this method throws an exception or returns
nullthe task instance will halted and put into an error state.- Returns:
Intervalwith the time interval until the next action should be performed and callback to invoke
-
validateParameters
-