Record Class AddTriggerRequest<T extends Serializable>
java.lang.Object
java.lang.Record
org.sterl.spring.persistent_tasks.api.AddTriggerRequest<T>
- Type Parameters:
T
- state type which has to be ofSerializable
public record AddTriggerRequest<T extends Serializable>(TriggerKey key, T extends Serializable state, OffsetDateTime runtAt, int priority, String correlationId)
extends Record
/**
For any registered persistentTask a persistentTask trigger represent one unit of work, executing this persistentTask once.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionAddTriggerRequest
(TriggerKey key, T state, OffsetDateTime runtAt, int priority, String correlationId) Creates an instance of aAddTriggerRequest
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecorrelationId
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.key()
Returns the value of thekey
record component.int
priority()
Returns the value of thepriority
record component.runtAt()
Returns the value of theruntAt
record component.state()
Returns the value of thestate
record component.taskId()
toList()
final String
toString()
Returns a string representation of this record class.
-
Field Details
-
DEFAULT_PRIORITY
public static final int DEFAULT_PRIORITY- See Also:
-
-
Constructor Details
-
AddTriggerRequest
public AddTriggerRequest(TriggerKey key, T state, OffsetDateTime runtAt, int priority, String correlationId) Creates an instance of aAddTriggerRequest
record class.- Parameters:
key
- the value for thekey
record componentstate
- the value for thestate
record componentruntAt
- the value for theruntAt
record componentpriority
- the value for thepriority
record componentcorrelationId
- the value for thecorrelationId
record component
-
-
Method Details
-
taskId
-
toList
-
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. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
key
Returns the value of thekey
record component.- Returns:
- the value of the
key
record component
-
state
Returns the value of thestate
record component.- Returns:
- the value of the
state
record component
-
runtAt
Returns the value of theruntAt
record component.- Returns:
- the value of the
runtAt
record component
-
priority
public int priority()Returns the value of thepriority
record component.- Returns:
- the value of the
priority
record component
-
correlationId
Returns the value of thecorrelationId
record component.- Returns:
- the value of the
correlationId
record component
-