Record Class TriggerFailedEvent
java.lang.Object
java.lang.Record
org.sterl.spring.persistent_tasks.trigger.event.TriggerFailedEvent
- All Implemented Interfaces:
PersistentTasksEvent,HasTrigger,TriggerLifeCycleEvent
public record TriggerFailedEvent(Long id, TriggerEntity 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, TriggerEntity data, Serializable state, Exception exception, OffsetDateTime retryAt) Creates an instance of aTriggerFailedEventrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondata()Returns the value of thedatarecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexceptionrecord component.final inthashCode()Returns a hash code value for this object.id()Returns the value of theidrecord component.booleanisDone()If a trigger is done, it finished it's execution either successfully or with an final error without retries left.retryAt()Returns the value of theretryAtrecord component.state()Returns the value of thestaterecord component.final StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.sterl.spring.persistent_tasks.shared.model.HasTrigger
executionCount, isRunning, key, newTaskId, shouldRunInFuture, statusMethods inherited from interface org.sterl.spring.persistent_tasks.trigger.event.TriggerLifeCycleEvent
getData, getId, timePassedMs
-
Constructor Details
-
Method Details
-
isDone
public boolean isDone()Description copied from interface:TriggerLifeCycleEventIf a trigger is done, it finished it's execution either successfully or with an final error without retries left.- Specified by:
isDonein interfaceTriggerLifeCycleEvent- Returns:
trueif 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. All components in this record class are compared withObjects::equals(Object,Object). -
id
Returns the value of theidrecord component.- Specified by:
idin interfaceTriggerLifeCycleEvent- Returns:
- the value of the
idrecord component
-
data
Returns the value of thedatarecord component.- Specified by:
datain interfaceTriggerLifeCycleEvent- Returns:
- the value of the
datarecord component
-
state
Returns the value of thestaterecord component.- Specified by:
statein interfaceTriggerLifeCycleEvent- Returns:
- the value of the
staterecord component
-
exception
Returns the value of theexceptionrecord component.- Returns:
- the value of the
exceptionrecord component
-
retryAt
Returns the value of theretryAtrecord component.- Returns:
- the value of the
retryAtrecord component
-