Record Class TriggerFailedEvent
java.lang.Object
java.lang.Record
org.sterl.spring.persistent_tasks.trigger.event.TriggerFailedEvent
- All Implemented Interfaces:
PersistentTasksEvent
,HasTriggerData
,TriggerLifeCycleEvent
public record TriggerFailedEvent(long id, TriggerData data, Serializable state, Exception exception, OffsetDateTime retryAt)
extends Record
implements TriggerLifeCycleEvent
Inside a transaction, it is save to join or listen for the AFTER_COMMIT
-
Constructor Summary
ConstructorsConstructorDescriptionTriggerFailedEvent
(long id, TriggerData data, Serializable state, Exception exception, OffsetDateTime retryAt) Creates an instance of aTriggerFailedEvent
record class. -
Method Summary
Modifier and TypeMethodDescriptiondata()
Returns the value of thedata
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexception
record component.final int
hashCode()
Returns a hash code value for this object.long
id()
Returns the value of theid
record component.boolean
isDone()
retryAt()
Returns the value of theretryAt
record component.state()
Returns the value of thestate
record component.final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.sterl.spring.persistent_tasks.shared.model.HasTriggerData
executionCount, isRunning, key, newTaskId, shouldRunInFuture, status
Methods inherited from interface org.sterl.spring.persistent_tasks.trigger.event.TriggerLifeCycleEvent
getData
-
Constructor Details
-
Method Details
-
isDone
public boolean isDone()- Specified by:
isDone
in interfaceTriggerLifeCycleEvent
- Returns:
true
if the trigger was completed, either with success, error or canceled.
-
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 '=='. -
id
public long id()Returns the value of theid
record component.- Specified by:
id
in interfaceTriggerLifeCycleEvent
- Returns:
- the value of the
id
record component
-
data
Returns the value of thedata
record component.- Specified by:
data
in interfaceTriggerLifeCycleEvent
- Returns:
- the value of the
data
record component
-
state
Returns the value of thestate
record component.- Specified by:
state
in interfaceTriggerLifeCycleEvent
- Returns:
- the value of the
state
record component
-
exception
Returns the value of theexception
record component.- Returns:
- the value of the
exception
record component
-
retryAt
Returns the value of theretryAt
record component.- Returns:
- the value of the
retryAt
record component
-