A run's lease on a thread, as a Checkpointer granted it: the run that holds it, the FencingToken its commits must carry, and when it expires by the store's clock unless renewed. While it is live - expiresAt has not passed - no other claim on the thread is granted, so a run in another runtime or process is refused with GraphError.ThreadBusy. Once it has expired, another run may take the thread over, and the store then refuses this claim's token (GraphError.StaleClaim). tenantId is the tenant the claim was requested for (ClaimRequest.tenantId). takenOverFrom is the holder of the expired claim, never released, that this one replaced, named only when that claim was of the same tenant as this one: None when the thread was free, and when the replaced claim was another tenant's or recorded no tenant (a claim a store persisted before claims carried one), so that a takeover never reveals another tenant's RunId.
To the store, the holder may still commit and renew past expiresAt until another claim replaces it: expiry only lets another run claim the thread. A GraphRuntime does not rely on that: a run judges its own lease, by its monotonic clock from just before it sent the request that granted or last renewed the claim, and stops with GraphError.ClaimLost once that lease has passed. That is no later than the store's expiry provided the store judges it by one clock that does not run faster than the runtime's monotonic clock and is not stepped forward; a constant offset does not matter. A store clock that runs ahead - stepped forward, or each process of a shared store on its own skewed clock - can expire the claim early, and another run can take the thread over while this one still runs: it then stops at its next refused renewal or commit, and fencing keeps every write safe.
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait Serializabletrait Producttrait Equalsclass Objecttrait Matchableclass Any