Class FixedDelay
- java.lang.Object
-
- com.github.kagkarlsson.scheduler.task.schedule.FixedDelay
-
- All Implemented Interfaces:
Schedule
,Serializable
public class FixedDelay extends Object implements Schedule, Serializable
- See Also:
- Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
Instant
getInitialExecutionTime(Instant now)
Used to get the first execution-time for a schedule.Instant
getNextExecutionTime(ExecutionComplete executionComplete)
int
hashCode()
boolean
isDeterministic()
static FixedDelay
of(Duration duration)
static FixedDelay
ofHours(int hours)
static FixedDelay
ofMillis(long millis)
static FixedDelay
ofMinutes(int minutes)
static FixedDelay
ofSeconds(int seconds)
String
toString()
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com.github.kagkarlsson.scheduler.task.schedule.Schedule
isDisabled
-
-
-
-
Method Detail
-
of
public static FixedDelay of(Duration duration)
-
ofMillis
public static FixedDelay ofMillis(long millis)
-
ofSeconds
public static FixedDelay ofSeconds(int seconds)
-
ofMinutes
public static FixedDelay ofMinutes(int minutes)
-
ofHours
public static FixedDelay ofHours(int hours)
-
getNextExecutionTime
public Instant getNextExecutionTime(ExecutionComplete executionComplete)
- Specified by:
getNextExecutionTime
in interfaceSchedule
-
getInitialExecutionTime
public Instant getInitialExecutionTime(Instant now)
Description copied from interface:Schedule
Used to get the first execution-time for a schedule. Simulates an ExecutionComplete event.- Specified by:
getInitialExecutionTime
in interfaceSchedule
-
isDeterministic
public boolean isDeterministic()
- Specified by:
isDeterministic
in interfaceSchedule
-
-