Interface ScheduledJobParameter

All Superinterfaces:
org.opensearch.common.xcontent.ToXContent, org.opensearch.common.xcontent.ToXContentObject

public interface ScheduledJobParameter
extends org.opensearch.common.xcontent.ToXContentObject
Job parameters that being used by the JobScheduler.
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.opensearch.common.xcontent.ToXContent

    org.opensearch.common.xcontent.ToXContent.DelegatingMapParams, org.opensearch.common.xcontent.ToXContent.MapParams, org.opensearch.common.xcontent.ToXContent.Params
  • Field Summary

    Fields inherited from interface org.opensearch.common.xcontent.ToXContent

    EMPTY_PARAMS
  • Method Summary

    Modifier and Type Method Description
    java.time.Instant getEnabledTime()  
    default java.lang.Double getJitter()
    Job will be delayed randomly with range of (0, jitter)*interval for the next execution time.
    java.time.Instant getLastUpdateTime()  
    default java.lang.Long getLockDurationSeconds()  
    java.lang.String getName()  
    Schedule getSchedule()  
    boolean isEnabled()  

    Methods inherited from interface org.opensearch.common.xcontent.ToXContent

    toXContent

    Methods inherited from interface org.opensearch.common.xcontent.ToXContentObject

    isFragment
  • Method Details

    • getName

      java.lang.String getName()
      Returns:
      job name.
    • getLastUpdateTime

      java.time.Instant getLastUpdateTime()
      Returns:
      job last update time.
    • getEnabledTime

      java.time.Instant getEnabledTime()
      Returns:
      get job enabled time.
    • getSchedule

      Schedule getSchedule()
      Returns:
      job schedule.
    • isEnabled

      boolean isEnabled()
      Returns:
      true if job is enabled, false otherwise.
    • getLockDurationSeconds

      default java.lang.Long getLockDurationSeconds()
      Returns:
      Null if scheduled job doesn't need lock. Seconds of lock duration if the scheduled job needs to be a singleton runner.
    • getJitter

      default java.lang.Double getJitter()
      Job will be delayed randomly with range of (0, jitter)*interval for the next execution time. For example, if next run is 10 minutes later, jitter is 0.6, then next job run will be randomly delayed by 0 to 6 minutes. Jitter is percentage, so it should be positive and less than 1.

      Note: default logic for these cases: 1).If jitter is not set, will regard it as 0.0. 2).If jitter is negative, will reset it as 0.0. 3).If jitter exceeds jitter limit, will cap it as jitter limit. Default jitter limit is 0.95. So if you set jitter as 0.96, will cap it as 0.95.

      Returns:
      job execution jitter