Record Class InvocationReliabilityOptions
java.lang.Object
java.lang.Record
org.j7m.middleware.api.reliability.InvocationReliabilityOptions
- Record Components:
deliverySemantics- delivery semanticsidempotencyKey- optional idempotency keydedupeKey- optional dedupe keyorderingKey- optional ordering keydurableOperationId- optional durable operation idfencingToken- optional fencing tokenmonotonicEpoch- optional epochcausalContext- optional causal contextcorrelationContext- optional correlation contextreplayPolicy- replay policyduplicateDetectionPolicy- duplicate detection policybackpressurePolicy- backpressure policycancellationRequested- cancellation propagation flagmaxPayloadBytes- payload limit, or zero for unsetmaxResultBytes- result limit, or zero for unsetretryAfter- retry-after metadata, ornull
- All Implemented Interfaces:
Serializable
public record InvocationReliabilityOptions(DeliverySemantics deliverySemantics, IdempotencyKey idempotencyKey, DedupeKey dedupeKey, OrderingKey orderingKey, DurableOperationId durableOperationId, FencingToken fencingToken, MonotonicEpoch monotonicEpoch, CausalContext causalContext, CorrelationContext correlationContext, ReplayPolicy replayPolicy, DuplicateDetectionPolicy duplicateDetectionPolicy, BackpressurePolicy backpressurePolicy, boolean cancellationRequested, long maxPayloadBytes, long maxResultBytes, Duration retryAfter)
extends Record
implements Serializable
Typed reliability metadata carried through invocation options.
The record is immutable, serializable, and thread-safe. It serializes to deterministic string metadata so transports remain vendor-neutral. Raw payload values are never embedded in metadata generated by this type.
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionInvocationReliabilityOptions(DeliverySemantics deliverySemantics, IdempotencyKey idempotencyKey, DedupeKey dedupeKey, OrderingKey orderingKey, DurableOperationId durableOperationId, FencingToken fencingToken, MonotonicEpoch monotonicEpoch, CausalContext causalContext, CorrelationContext correlationContext, ReplayPolicy replayPolicy, DuplicateDetectionPolicy duplicateDetectionPolicy, BackpressurePolicy backpressurePolicy, boolean cancellationRequested, long maxPayloadBytes, long maxResultBytes, Duration retryAfter) Creates validated invocation reliability options. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebackpressurePolicyrecord component.booleanReturns the value of thecancellationRequestedrecord component.Returns the value of thecausalContextrecord component.Returns the value of thecorrelationContextrecord component.Returns the value of thededupeKeyrecord component.static InvocationReliabilityOptionsdefaults()Returns default at-most-once reliability options.Returns the value of thedeliverySemanticsrecord component.Returns the value of theduplicateDetectionPolicyrecord component.Returns the value of thedurableOperationIdrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of thefencingTokenrecord component.static InvocationReliabilityOptionsfromMetadata(Map<String, String> metadata) Decodes reliability options from invocation metadata.final inthashCode()Returns a hash code value for this object.Returns the value of theidempotencyKeyrecord component.longReturns the value of themaxPayloadBytesrecord component.longReturns the value of themaxResultBytesrecord component.Merges these options into existing metadata.Returns the value of themonotonicEpochrecord component.Returns the value of theorderingKeyrecord component.Returns the value of thereplayPolicyrecord component.Returns the value of theretryAfterrecord component.Encodes these options as transport-neutral metadata.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
PREFIX
Prefix used for transport-neutral reliability metadata keys.- See Also:
-
-
Constructor Details
-
InvocationReliabilityOptions
public InvocationReliabilityOptions(DeliverySemantics deliverySemantics, IdempotencyKey idempotencyKey, DedupeKey dedupeKey, OrderingKey orderingKey, DurableOperationId durableOperationId, FencingToken fencingToken, MonotonicEpoch monotonicEpoch, CausalContext causalContext, CorrelationContext correlationContext, ReplayPolicy replayPolicy, DuplicateDetectionPolicy duplicateDetectionPolicy, BackpressurePolicy backpressurePolicy, boolean cancellationRequested, long maxPayloadBytes, long maxResultBytes, Duration retryAfter) Creates validated invocation reliability options.
-
-
Method Details
-
defaults
Returns default at-most-once reliability options.- Returns:
- default options
-
fromMetadata
Decodes reliability options from invocation metadata.- Parameters:
metadata- metadata map- Returns:
- decoded options
-
toMetadata
-
mergeInto
-
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. -
deliverySemantics
Returns the value of thedeliverySemanticsrecord component.- Returns:
- the value of the
deliverySemanticsrecord component
-
idempotencyKey
Returns the value of theidempotencyKeyrecord component.- Returns:
- the value of the
idempotencyKeyrecord component
-
dedupeKey
-
orderingKey
Returns the value of theorderingKeyrecord component.- Returns:
- the value of the
orderingKeyrecord component
-
durableOperationId
Returns the value of thedurableOperationIdrecord component.- Returns:
- the value of the
durableOperationIdrecord component
-
fencingToken
Returns the value of thefencingTokenrecord component.- Returns:
- the value of the
fencingTokenrecord component
-
monotonicEpoch
Returns the value of themonotonicEpochrecord component.- Returns:
- the value of the
monotonicEpochrecord component
-
causalContext
Returns the value of thecausalContextrecord component.- Returns:
- the value of the
causalContextrecord component
-
correlationContext
Returns the value of thecorrelationContextrecord component.- Returns:
- the value of the
correlationContextrecord component
-
replayPolicy
Returns the value of thereplayPolicyrecord component.- Returns:
- the value of the
replayPolicyrecord component
-
duplicateDetectionPolicy
Returns the value of theduplicateDetectionPolicyrecord component.- Returns:
- the value of the
duplicateDetectionPolicyrecord component
-
backpressurePolicy
Returns the value of thebackpressurePolicyrecord component.- Returns:
- the value of the
backpressurePolicyrecord component
-
cancellationRequested
public boolean cancellationRequested()Returns the value of thecancellationRequestedrecord component.- Returns:
- the value of the
cancellationRequestedrecord component
-
maxPayloadBytes
public long maxPayloadBytes()Returns the value of themaxPayloadBytesrecord component.- Returns:
- the value of the
maxPayloadBytesrecord component
-
maxResultBytes
public long maxResultBytes()Returns the value of themaxResultBytesrecord component.- Returns:
- the value of the
maxResultBytesrecord component
-
retryAfter
Returns the value of theretryAfterrecord component.- Returns:
- the value of the
retryAfterrecord component
-