Package dev.turboism.sdk.task
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 activekind- workload class the scheduler uses to pick an execution lanepriority- relative ordering hint within that laneinitialDelay- wait before the first run; may beDuration.ZEROdelay- wait between the end of one run and the start of the next; must be positiveaction- 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 Summary
ConstructorsConstructorDescriptionFixedDelayTaskRequest(TaskId id, PluginTaskKind kind, PluginTaskPriority priority, Duration initialDelay, Duration delay, PluginTaskAction action) Validates the record components. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.delay()Returns the value of thedelayrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.Returns the value of theinitialDelayrecord component.kind()Returns the value of thekindrecord component.priority()Returns the value of thepriorityrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
FixedDelayTaskRequest
public FixedDelayTaskRequest(TaskId id, PluginTaskKind kind, PluginTaskPriority priority, Duration initialDelay, Duration delay, PluginTaskAction action) Validates the record components.- Throws:
NullPointerException- if any component isnullIllegalArgumentException- ifinitialDelayis negative ordelayis not positive
-
-
Method Details
-
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. -
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. -
equals
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 withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
kind
Returns the value of thekindrecord component.- Returns:
- the value of the
kindrecord component
-
priority
Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
initialDelay
Returns the value of theinitialDelayrecord component.- Returns:
- the value of the
initialDelayrecord component
-
delay
Returns the value of thedelayrecord component.- Returns:
- the value of the
delayrecord component
-
action
Returns the value of theactionrecord component.- Returns:
- the value of the
actionrecord component
-