Package io.temporal.client.schedules
Class ScheduleSpec
- java.lang.Object
-
- io.temporal.client.schedules.ScheduleSpec
-
public final class ScheduleSpec extends java.lang.Object
Specification of the times scheduled actions may occur. The times are the union ofcalendars
,intervals
, andcronExpressions
excluding anything inskip
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ScheduleSpec.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
java.util.List<ScheduleCalendarSpec>
getCalendars()
Gets the calendar-based specification of times.java.util.List<java.lang.String>
getCronExpressions()
Gets the cron-based specification of times.java.time.Instant
getEndAt()
Gets the time after which any matching times will be skipped.java.util.List<ScheduleIntervalSpec>
getIntervals()
Gets the interval-based specification of times.java.time.Duration
getJitter()
Gets the jitter to apply to each action.java.util.List<ScheduleCalendarSpec>
getSkip()
Gets the set of matching calendar times that will be skipped.java.time.Instant
getStartAt()
Gets the time before which any matching times will be skipped.java.lang.String
getTimeZoneName()
Gets the IANA time zone name, for exampleUS/Central .int
hashCode()
static ScheduleSpec.Builder
newBuilder()
static ScheduleSpec.Builder
newBuilder(ScheduleSpec options)
java.lang.String
toString()
-
-
-
Method Detail
-
newBuilder
public static ScheduleSpec.Builder newBuilder()
-
newBuilder
public static ScheduleSpec.Builder newBuilder(ScheduleSpec options)
-
getCalendars
public java.util.List<ScheduleCalendarSpec> getCalendars()
Gets the calendar-based specification of times.- Returns:
- list of
ScheduleCalendarSpec
the schedule may run at.
-
getIntervals
public java.util.List<ScheduleIntervalSpec> getIntervals()
Gets the interval-based specification of times.- Returns:
- list of
ScheduleIntervalSpec
the schedule may run at.
-
getCronExpressions
public java.util.List<java.lang.String> getCronExpressions()
Gets the cron-based specification of times.This is provided for easy migration from legacy string-based cron scheduling. New uses should use
calendars
instead. These expressions will be translated to calendar-based specifications on the server.- Returns:
- list of cron expressions the schedule may run at.
-
getSkip
public java.util.List<ScheduleCalendarSpec> getSkip()
Gets the set of matching calendar times that will be skipped.- Returns:
- list of
ScheduleCalendarSpec
the schedule will not run at.
-
getStartAt
public java.time.Instant getStartAt()
Gets the time before which any matching times will be skipped.- Returns:
- schedule start time
-
getEndAt
public java.time.Instant getEndAt()
Gets the time after which any matching times will be skipped.- Returns:
- schedule end time
-
getJitter
public java.time.Duration getJitter()
Gets the jitter to apply to each action.- Returns:
- amount of jitter applied
-
getTimeZoneName
public java.lang.String getTimeZoneName()
Gets the IANA time zone name, for exampleUS/Central .- Returns:
- string representing the timezone.
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-