Record Class SagaCancelRequest
java.lang.Object
java.lang.Record
org.j7m.middleware.api.saga.SagaCancelRequest
- Record Components:
executionId- execution to cancelreason- stable safe cancellation reasoncompensate- whether the request asks for compensation of successful steps
- All Implemented Interfaces:
Serializable
public record SagaCancelRequest(SagaExecutionId executionId, String reason, boolean compensate)
extends Record
implements Serializable
Request to cancel a saga execution.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSagaCancelRequest(SagaExecutionId executionId, String reason, boolean compensate) Creates a validated request. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the value of thecompensaterecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexecutionIdrecord component.final inthashCode()Returns a hash code value for this object.reason()Returns the value of thereasonrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SagaCancelRequest
Creates a validated request.
-
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
executionId
Returns the value of theexecutionIdrecord component.- Returns:
- the value of the
executionIdrecord component
-
reason
-
compensate
public boolean compensate()Returns the value of thecompensaterecord component.- Returns:
- the value of the
compensaterecord component
-