Lease

data class Lease(val id: LeaseId, val leaf: GroupId, val reserved: Long, val startedAt: Long)

One open lease: one slot of work running for leaf.

Constructors

Link copied to clipboard
constructor(id: LeaseId, leaf: GroupId, reserved: Long, startedAt: Long)

Properties

Link copied to clipboard
val id: LeaseId
Link copied to clipboard
Link copied to clipboard

the cost delegated to it so far: its reservation plus every extension, less every LocalHeddle.shrink. 0 for a lease LocalHeddle.admit opened past the lifetime limit, which reserved nothing, and for one shrunk by all it reserved. A lease at 0 is still open, and a removal of its lane still waits on it.

Link copied to clipboard

when the work started, as the caller reported it, in the cost unit. Stored and handed back, never read by a pick: two runs that differ only in start times make the same picks.