Anchorage API reference
    Preparing search index...

    Idempotency store that can distinguish an absent key from a pending claim without reserving it. Atomic stores need this capability during the v1-to-v2 composite-key transition so legacy pending work cannot be mistaken for a miss and executed again.

    interface InspectableIdempotencyStore {
        get(
            key: string,
        ): IdempotencyRecord | Promise<IdempotencyRecord | undefined> | undefined;
        inspect(
            key: string,
        ): IdempotencyInspection | Promise<IdempotencyInspection>;
        put(
            key: string,
            record: IdempotencyRecord,
            token?: string,
        ): void | Promise<void>;
    }

    Hierarchy (View Summary)

    Implemented by

    Index

    Methods

    Methods

    • Finalize a key's record. token is the lease returned by an atomic reserve(): when supplied, the store finalizes ONLY if the key still belongs to that lease. A stale holder whose lease was taken over cannot overwrite the new result. Omit the token on the legacy get/put path, which upserts unconditionally (same-isolate protection only).

      Parameters

      Returns void | Promise<void>