Record Class SagaCommand
java.lang.Object
java.lang.Record
org.j7m.middleware.api.saga.SagaCommand
- Record Components:
payload- application command payload bytesmetadata- redacted command metadata
- All Implemented Interfaces:
Serializable
public record SagaCommand(byte[] payload, Map<String,String> metadata)
extends Record
implements Serializable
Command payload supplied to a saga step action.
The payload is copied on construction and access. Status, evidence, dead-letter records, recovery reports, and exception messages must expose only redacted metadata and never the raw payload bytes.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSagaCommand(byte[] payload, Map<String, String> metadata) Creates a validated command with defensive copies. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.metadata()Returns the value of themetadatarecord component.byte[]payload()Returns a defensive payload copy.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SagaCommand
-
-
Method Details
-
payload
public byte[] payload()Returns a defensive payload copy.- Returns:
- copied 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). -
metadata
-