Record Class SagaStartRequest
java.lang.Object
java.lang.Record
org.j7m.middleware.api.saga.SagaStartRequest
- Record Components:
definitionId- definition to executeoptions- durable execution optionstransactionContext- transaction/correlation context propagated to stepspayload- application payload supplied to the first command context
- All Implemented Interfaces:
Serializable
public record SagaStartRequest(SagaDefinitionId definitionId, SagaOptions options, TransactionContext transactionContext, byte[] payload)
extends Record
implements Serializable
Request to start a saga execution.
The payload is copied and used only for action invocation. Public status, evidence, and errors must never expose the raw payload bytes.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSagaStartRequest(SagaDefinitionId definitionId, SagaOptions options, TransactionContext transactionContext, byte[] payload) Creates a validated request. -
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.options()Returns the value of theoptionsrecord component.byte[]payload()Returns a defensive payload copy.final StringtoString()Returns a string representation of this record class.Returns the value of thetransactionContextrecord component.
-
Constructor Details
-
SagaStartRequest
public SagaStartRequest(SagaDefinitionId definitionId, SagaOptions options, TransactionContext transactionContext, byte[] payload) Creates a validated request.
-
-
Method Details
-
payload
public byte[] payload()Returns a defensive payload copy.- Returns:
- copied start payload bytes
-
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
-
options
-
transactionContext
Returns the value of thetransactionContextrecord component.- Returns:
- the value of the
transactionContextrecord component
-