LocalHeddleState

data class LocalHeddleState(val ledger: EntitlementLedger, val leases: List<Lease>, val epoch: Long, val allocatorMemory: AllocatorMemory)

A LocalHeddle's state, as one immutable value: once taken, safe to read or hand to another thread without the caller's scheduling lock. What a restart needs is LocalHeddleSnapshot, taken by LocalHeddle.persist; this is the status view.

Mints need no counter: each epoch writes one mint record, local#<epoch>, whose amount is the epoch's running total, read back off the ledger.

Constructors

Link copied to clipboard
constructor(ledger: EntitlementLedger, leases: List<Lease>, epoch: Long, allocatorMemory: AllocatorMemory)

Properties

Link copied to clipboard

the fair-share allocator's wake memory, which a restart must keep for the next pick to be the one this engine would have made.

Link copied to clipboard
val epoch: Long
Link copied to clipboard

every open lease, in LeaseId order.

Link copied to clipboard