Record Class SagaEvidence
java.lang.Object
java.lang.Record
org.j7m.middleware.api.saga.SagaEvidence
- Record Components:
timestamp- event timestamp from the saga clockaction- stable action nameexecutionId- execution associated with the event, ornullwhen not applicablestepId- step associated with the event, ornullwhen not applicabletransactionContextId- safe transaction context identifierdecision- stable decision or result classificationreasonCode- stable machine-readable reason codemetadata- redacted evidence metadata
- All Implemented Interfaces:
Serializable
public record SagaEvidence(Instant timestamp, String action, SagaExecutionId executionId, SagaStepId stepId, String transactionContextId, String decision, String reasonCode, Map<String,String> metadata)
extends Record
implements Serializable
Safe saga evidence/audit event.
Evidence records are intended for operator status, audit, and acceptance reports. Metadata is redacted on construction and must not contain raw command payloads or credentials.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionSagaEvidence(Instant timestamp, String action, SagaExecutionId executionId, SagaStepId stepId, String transactionContextId, String decision, String reasonCode, Map<String, String> metadata) Creates a validated immutable evidence entry. -
Method Summary
Modifier and TypeMethodDescriptionaction()Returns the value of theactionrecord component.decision()Returns the value of thedecisionrecord 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.metadata()Returns the value of themetadatarecord component.Returns the value of thereasonCoderecord component.stepId()Returns the value of thestepIdrecord component.Returns the value of thetimestamprecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thetransactionContextIdrecord component.
-
Constructor Details
-
SagaEvidence
public SagaEvidence(Instant timestamp, String action, SagaExecutionId executionId, SagaStepId stepId, String transactionContextId, String decision, String reasonCode, Map<String, String> metadata) Creates a validated immutable evidence entry.
-
-
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). -
timestamp
-
action
-
executionId
Returns the value of theexecutionIdrecord component.- Returns:
- the value of the
executionIdrecord component
-
stepId
-
transactionContextId
Returns the value of thetransactionContextIdrecord component.- Returns:
- the value of the
transactionContextIdrecord component
-
decision
-
reasonCode
Returns the value of thereasonCoderecord component.- Returns:
- the value of the
reasonCoderecord component
-
metadata
-