public class FixedDelayTimingStrategy extends Object implements TimingStrategy
TimingStrategy that causes tasks to be scheduled in regular intervals.NEVER_RUN, UNKNOWN| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
static FixedDelayTimingStrategy |
getInstance() |
int |
hashCode() |
void |
initialize(org.neo4j.graphdb.GraphDatabaseService database)
Initialize the timing strategy before it can be used.
|
long |
nextDelay(long lastTaskDuration)
Get the delay until the timer fires again.
|
FixedDelayTimingStrategy |
withDelay(long delay)
Create a new strategy with a different fixed delay.
|
FixedDelayTimingStrategy |
withInitialDelay(long initialDelay)
Create a new strategy with a different initial delay.
|
public static FixedDelayTimingStrategy getInstance()
public FixedDelayTimingStrategy withInitialDelay(long initialDelay)
initialDelay - of the new strategy.public FixedDelayTimingStrategy withDelay(long delay)
delay - of the new strategy.public void initialize(org.neo4j.graphdb.GraphDatabaseService database)
initialize in interface TimingStrategydatabase - against which the runtime using this strategy runs.public long nextDelay(long lastTaskDuration)
nextDelay in interface TimingStrategylastTaskDuration - The total time it took to execute the last task in milliseconds. -1 if unknown.Copyright © 2013-2016–2018 Graph Aware Limited. All rights reserved.