public class TaskSchedule extends Object implements Serializable
TaskState.| Constructor and Description |
|---|
TaskSchedule(java.time.Instant runAt,
java.time.Duration interval) |
TaskSchedule(long runAt,
Long interval) |
| Modifier and Type | Method and Description |
|---|---|
static TaskSchedule |
at(java.time.Instant instant)
Create a schedule to run a task at a specified instant.
|
Long |
getInterval() |
long |
getRunAt() |
TaskSchedule |
incrementByInterval()
Returns a copy of this Schedule that will start a task after the given interval
|
Optional<java.time.Duration> |
interval()
Get the interval that the task should recur, if it is a recurring task.
|
boolean |
isRecurring()
Get whether the task is a recurring task.
|
static TaskSchedule |
now()
Create a schedule to run a task now.
|
static TaskSchedule |
recurring(java.time.Duration interval)
Create a schedule to run a task that recurs on an interval.
|
static TaskSchedule |
recurring(java.time.Instant instant,
java.time.Duration interval)
Create a schedule to run a task that recurs on an interval, starting at the specified instance.
|
java.time.Instant |
runAt()
Get the instant the task is specified to run at.
|
public TaskSchedule(java.time.Instant runAt,
@Nullable
java.time.Duration interval)
public static TaskSchedule now()
public static TaskSchedule at(java.time.Instant instant)
public static TaskSchedule recurring(java.time.Duration interval)
public static TaskSchedule recurring(java.time.Instant instant, java.time.Duration interval)
public java.time.Instant runAt()
public long getRunAt()
public Optional<java.time.Duration> interval()
public Long getInterval()
public boolean isRecurring()
public TaskSchedule incrementByInterval()
Copyright © 2017 Grakn Labs Ltd. All rights reserved.