Records a reservation in the locked day, adds it to the day's open total, and answers its id.
Settles an open reservation once, at settledMicro held to the amount reserved: the day's open total loses the
amount and its settled total gains what settled. Answers false, changing nothing, for one already settled or unknown.
The open reservations whose time is up at at. A store with fencedReservations leaves a deferred one out until
its next check has come, and lists each one's requireFence and last evidence. A store with
operationReservations lists an operation's row only once it is past its expiry with no live lease, its micro
the recorded figure, which releaseExpiredSpend settles it at.
Optional addRecords a reservation as addReservation does, made with requireFence, and answers its id.
Optional deferAtomically persists a permanent fence, next check and evidence; false for a closed or unknown row.
Optional addRecords an operation's row in the locked day with run 1's own row, its recorded figure run 1's bound and run 1
holding the lease, adds micro to the day's open total, and answers its id; null, changing nothing, when the
operation has a row already.
Optional openThe operation's row, or null.
Optional beginIn one locked step: gone when the row is settled or past its expiry at at; in_flight while a lease is live;
gone when it has had maxRuns runs or runMicro would take its recorded figure past its amount; else the run's
bound added to the recorded figure, the run counted, its own row written and the lease given to it.
Optional endIn one transaction, all or nothing: the run's own row takes settledMicro held to its bound, unless it ended
already, when nothing changes; then, only when run holds the lease of an open row, its bound in the recorded
figure is replaced by that figure, the lease cleared, and the row settled at its recorded figure when at is past
its expiry or close is set.
Optional renewIn one locked step: true, the lease moved to leaseUntil, only when run holds a lease still live at at on an
open row; false, changing nothing, otherwise. A run renews its lease before it settles what it holds outside the
row (a unit on another meter), so no other run can begin and take that unit over while it settles it.
Optional Readonly fencedTrue on a store that holds fenced reservations, with addFencedReservation and deferReservation.
Optional Readonly operationTrue on a store that holds operation reservations, with the five methods below.
The rows a day's bound needs, kept by the caller; every method runs inside the caller's transaction. A store that holds fenced reservations says so with
fencedReservationsand implementsaddFencedReservationanddeferReservation, persisting the fence, the next check and the evidence in the caller's transaction. A store without that capability cannot admit a fenced reservation or run a sweep with a resolver. A store that holds operation reservations says so withoperationReservationsand implementsaddOperationReservation,openOperationReservation,beginRun,endRunandrenewRun; a store without them cannot admit an operation.