How many entries are held right now. Useful in tests, not a policy input.
Write entry only if nothing live is held under key. Returns "claimed", or what is held.
When the claim was taken.
How long past claimedAt the claim is honoured before the attempt is presumed dead.
Random per attempt. complete and release act only while the claim
under the key still carries it, so an attempt that outlived its lease
cannot touch the claim of the attempt that replaced it.
Expiry is measured against this store's own clock, not the writer's.
Drop whatever is held, whoever holds it. Called by Ledger.forget.
Drop the claim, only if key holds a claim whose owner is owner.
Returns whether it did. Called when an action threw or shouldStore
declined.
In-process store. Evicts the least recently used entry once
maxEntriesis exceeded, and treats entries past their lease or retention as absent.claimis atomic here because JavaScript is single-threaded and there is noawaitbetween the check and the write. That is a fact about one process. Two replicas with two of these will both run the same key, which is why the interface exists and this class is only one of its stores.