Package io.temporal.client.schedules
Class ScheduleSpec
- java.lang.Object
-
- io.temporal.client.schedules.ScheduleSpec
-
public final class ScheduleSpec extends java.lang.ObjectSpecification of the times scheduled actions may occur. The times are the union ofcalendars,intervals, andcronExpressionsexcluding anything inskip.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classScheduleSpec.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(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.InstantgetEndAt()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.DurationgetJitter()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.InstantgetStartAt()Gets the time before which any matching times will be skipped.java.lang.StringgetTimeZoneName()Gets the IANA time zone name, for exampleUS/Central .inthashCode()static ScheduleSpec.BuildernewBuilder()static ScheduleSpec.BuildernewBuilder(ScheduleSpec options)java.lang.StringtoString()
-
-
-
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
ScheduleCalendarSpecthe schedule may run at.
-
getIntervals
public java.util.List<ScheduleIntervalSpec> getIntervals()
Gets the interval-based specification of times.- Returns:
- list of
ScheduleIntervalSpecthe 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
calendarsinstead. 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
ScheduleCalendarSpecthe 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:
equalsin classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-