ScheduleOutcome

sealed interface ScheduleOutcome

What HeddleNode.schedule and GovernedHeddleNode.schedule did: delegated something, found nothing to delegate, stopped because the parent cannot be ordered or its pick met the lifetime limit, or, on a governed node only, was refused because this peer may not author entitlement yet (issue #1892).

NothingToDelegate clears by itself once holdings or demand arrive. WeightBudget does not: it is a property of the parent's children, so every later call at that parent answers the same until the children change. LifetimeExhausted lasts while the full edge is picked.

Inheritors

Types

Link copied to clipboard
data class Delegated(val grants: Int) : ScheduleOutcome

grants allocation rounds landed, each one a delegation down the tree. Always positive — zero grants is NothingToDelegate, never Delegated(0). A call that granted and then met a refusal answers this, and the next call at that parent answers the refusal.

Link copied to clipboard
data class LifetimeExhausted(val parent: GroupId) : ScheduleOutcome

The pick at parent chose an edge whose effective issuance the grant would carry past the lifetime watermark, Long.MAX_VALUE less LocalHeddle.LIFETIME_HEADROOM, on this peer's view (#3475), and nothing was written. A full edge that is next in line stalls its parent rather than being skipped, so this lasts while that edge is picked. Peers that each grant under their own view can merge past the watermark: their unmerged grants are absorbed while those on one edge total at most LocalHeddle.LIFETIME_HEADROOM, and past Long the merged sum throws when read, never wraps. A grant is bounded by the quantum and the holdings it is drawn from, not by LocalHeddle.MAX_RESERVATION.

Link copied to clipboard

The scheduler ran and delegated nothing: it found no holdings to move toward any advertised demand, or no child of the parent is asking for any.

Link copied to clipboard
data class WeightBudget(val parent: GroupId) : ScheduleOutcome

parent's active children carry weights whose products a pick forms leave Long, so no pick there can be computed, or that are too fine for one full lease, and nothing was written (#3353). The control log refuses such a set act by act, but the replicated ledger can still hold one: two peers each activating a child that fits beside what they see, or one peer receiving a later Activate before an earlier Close. It clears once one of the children closes.