Record Class SagaDefinition
java.lang.Object
java.lang.Record
org.j7m.middleware.api.saga.SagaDefinition
- Record Components:
definitionId- stable definition identifiersteps- immutable ordered step definitions
- All Implemented Interfaces:
Serializable
public record SagaDefinition(SagaDefinitionId definitionId, List<SagaStepDefinition> steps)
extends Record
implements Serializable
Ordered saga definition.
The definition owns the ordered step list for one saga type. Steps execute in list order and compensations execute in reverse order for steps that completed successfully.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSagaDefinition(SagaDefinitionId definitionId, List<SagaStepDefinition> steps) Creates a validated immutable definition. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefinitionIdrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.steps()Returns the value of thestepsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SagaDefinition
Creates a validated immutable definition.
-
-
Method Details
-
toString
-
hashCode
-
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). -
definitionId
Returns the value of thedefinitionIdrecord component.- Returns:
- the value of the
definitionIdrecord component
-
steps
-