Class IdempotencyClaim
- Namespace
- PatternKit.Messaging.Reliability
- Assembly
- PatternKit.Core.dll
Result returned when an idempotency key is claimed.
public sealed class IdempotencyClaim
- Inheritance
-
IdempotencyClaim
- Inherited Members
Properties
Claimed
Gets whether the caller owns the key and should process the message.
public bool Claimed { get; }
Property Value
FailureReason
The stored failure reason for a failed key, when available.
public string? FailureReason { get; }
Property Value
Key
The idempotency key.
public string Key { get; }
Property Value
Result
The replayable result stored for a completed key, when available.
public object? Result { get; }
Property Value
Status
The existing or newly-created key status.
public IdempotencyEntryStatus Status { get; }
Property Value
Methods
ClaimedKey(string)
Creates a claimed key result.
public static IdempotencyClaim ClaimedKey(string key)
Parameters
keystring
Returns
Existing(string, IdempotencyEntryStatus, object?, string?)
Creates an existing key result.
public static IdempotencyClaim Existing(string key, IdempotencyEntryStatus status, object? result = null, string? failureReason = null)
Parameters
keystringstatusIdempotencyEntryStatusresultobjectfailureReasonstring