Record Class ReliabilityContext
java.lang.Object
java.lang.Record
org.j7m.middleware.api.reliability.ReliabilityContext
- Record Components:
invocationId- invocation idoptions- reliability optionsmetadata- original invocation metadata
- All Implemented Interfaces:
Serializable
public record ReliabilityContext(String invocationId, InvocationReliabilityOptions options, Map<String,String> metadata)
extends Record
implements Serializable
Resolved reliability context for one invocation.
The record is immutable, serializable, and thread-safe. It is derived from public invocation metadata and carries no raw application payload.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionReliabilityContext(String invocationId, InvocationReliabilityOptions options, Map<String, String> metadata) Creates a validated context. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.static ReliabilityContextfrom(InvocationOptions invocationOptions) Resolves a reliability context from invocation options.final inthashCode()Returns a hash code value for this object.Returns the value of theinvocationIdrecord component.metadata()Returns the value of themetadatarecord component.options()Returns the value of theoptionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ReliabilityContext
public ReliabilityContext(String invocationId, InvocationReliabilityOptions options, Map<String, String> metadata) Creates a validated context.
-
-
Method Details
-
from
Resolves a reliability context from invocation options.- Parameters:
invocationOptions- invocation options- Returns:
- reliability context
-
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). -
invocationId
Returns the value of theinvocationIdrecord component.- Returns:
- the value of the
invocationIdrecord component
-
options
-
metadata
-