Table of Contents

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

bool

FailureReason

The stored failure reason for a failed key, when available.

public string? FailureReason { get; }

Property Value

string

Key

The idempotency key.

public string Key { get; }

Property Value

string

Result

The replayable result stored for a completed key, when available.

public object? Result { get; }

Property Value

object

Status

The existing or newly-created key status.

public IdempotencyEntryStatus Status { get; }

Property Value

IdempotencyEntryStatus

Methods

ClaimedKey(string)

Creates a claimed key result.

public static IdempotencyClaim ClaimedKey(string key)

Parameters

key string

Returns

IdempotencyClaim

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

key string
status IdempotencyEntryStatus
result object
failureReason string

Returns

IdempotencyClaim