Record Class FixedDelayTaskRequest

java.lang.Object
java.lang.Record
dev.turboism.sdk.task.FixedDelayTaskRequest
Record Components:
id - caller-chosen identity of the repeating task; the scheduler rejects a submission whose id is already active
kind - workload class the scheduler uses to pick an execution lane
priority - relative ordering hint within that lane
initialDelay - wait before the first run; may be Duration.ZERO
delay - wait between the end of one run and the start of the next; must be positive
action - the work to run on each repetition

public record FixedDelayTaskRequest(TaskId id, PluginTaskKind kind, PluginTaskPriority priority, Duration initialDelay, Duration delay, PluginTaskAction action) extends Record
A request to run a plugin action repeatedly, each run starting delay after the previous run finished.

The compact constructor rejects null components, a negative initialDelay and a delay that is not strictly positive, so a constructed request always describes a repetition that can make progress.

  • Constructor Details

  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public TaskId id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • kind

      public PluginTaskKind kind()
      Returns the value of the kind record component.
      Returns:
      the value of the kind record component
    • priority

      public PluginTaskPriority priority()
      Returns the value of the priority record component.
      Returns:
      the value of the priority record component
    • initialDelay

      public Duration initialDelay()
      Returns the value of the initialDelay record component.
      Returns:
      the value of the initialDelay record component
    • delay

      public Duration delay()
      Returns the value of the delay record component.
      Returns:
      the value of the delay record component
    • action

      public PluginTaskAction action()
      Returns the value of the action record component.
      Returns:
      the value of the action record component