Skip to main content
Defined in: coordination/types.ts:103 A granted per-key turn. The holder may run the key’s work until release or until signal aborts.

Properties

key

Defined in: coordination/types.ts:104

fence

Defined in: coordination/types.ts:105

previousHolder

Defined in: coordination/types.ts:111 Replica that held the previous turn of this key, null when unknown (first turn, or the key’s history expired). When it is not this replica, any in-memory state this replica kept for the key (a waiting conversation) may be stale.

signal

Defined in: coordination/types.ts:113 Aborts (with a LeaseLostError reason) when the turn is lost before release.

Methods

assertHeld()

Defined in: coordination/types.ts:115 Throws LeaseLostError when the turn was lost (cheap local check).

Returns

void

release()

Defined in: coordination/types.ts:117 Hand the key to the next ticket (idempotent).

Returns

Promise<void>