Record Class TriggerRequest<T extends Serializable>
java.lang.Object
java.lang.Record
org.sterl.spring.persistent_tasks.api.TriggerRequest<T>
- Type Parameters:
T- state type which has to be ofSerializable
public record TriggerRequest<T extends Serializable>(TriggerKey key, TriggerStatus status, T extends Serializable state, OffsetDateTime runtAt, int priority, String correlationId, String tag)
extends Record
/**
For any registered persistentTask a persistentTask trigger represent one unit of work, executing this persistentTask once.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTriggerRequest(TriggerKey key, TriggerStatus status, T state, OffsetDateTime runtAt, int priority, String correlationId, String tag) Creates an instance of aTriggerRequestrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecorrelationIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.key()Returns the value of thekeyrecord component.intpriority()Returns the value of thepriorityrecord component.runtAt()Returns the value of theruntAtrecord component.state()Returns the value of thestaterecord component.status()Returns the value of thestatusrecord component.tag()Returns the value of thetagrecord component.taskId()toList()final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT_PRIORITY
public static final int DEFAULT_PRIORITY- See Also:
-
-
Constructor Details
-
TriggerRequest
public TriggerRequest(TriggerKey key, TriggerStatus status, T state, OffsetDateTime runtAt, int priority, String correlationId, String tag) Creates an instance of aTriggerRequestrecord class.- Parameters:
key- the value for thekeyrecord componentstatus- the value for thestatusrecord componentstate- the value for thestaterecord componentruntAt- the value for theruntAtrecord componentpriority- the value for thepriorityrecord componentcorrelationId- the value for thecorrelationIdrecord componenttag- the value for thetagrecord 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 thekeyrecord component.- Returns:
- the value of the
keyrecord component
-
status
Returns the value of thestatusrecord component.- Returns:
- the value of the
statusrecord component
-
state
Returns the value of thestaterecord component.- Returns:
- the value of the
staterecord component
-
runtAt
Returns the value of theruntAtrecord component.- Returns:
- the value of the
runtAtrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
correlationId
Returns the value of thecorrelationIdrecord component.- Returns:
- the value of the
correlationIdrecord component
-
tag
Returns the value of thetagrecord component.- Returns:
- the value of the
tagrecord component
-