RouteAllocation class
The route family (ADR-0009 Decision 6's graduated conveniences) — drives a
RouteCapability's body once and reports its verdict. Not a process: it holds
no group to reap; dispose cancels the cooperative token and runs teardown.
- Inheritance
-
- Object
- Allocation
- RouteAllocation
Constructors
- RouteAllocation(RouteCapability capability, AllocationContext context)
-
Creates the route allocation for
capabilityundercontext.
Properties
- address → AllocationAddress
-
This effect's stable address (
<sessionId>/<nodePath>).no setterinherited - capability → RouteCapability
-
The pure route capability whose body this drives.
final
- context ↔ AllocationContext
-
The effect's context (config/transport/address/env/sink/fence).
getter/setter pairinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- isAdoptable → bool
-
Whether this effect type can be reattached to a survivor at its address
(D4 — a per-type opt-in; a one-shot/service cannot, a daemon/lease can).
When false, startOrAdopt always spawns fresh.
no setterinherited
- isDetachable → bool
-
Whether this effect type is safe to LEAVE RUNNING on unmount and re-adopt
later (D4 — a per-type opt-in; the Host only calls detach when true).
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- state ↔ AllocationState
-
The current lifecycle state — a pure observation subclasses advance as
their effect progresses (the Host maps reports → the persisted cursor; this
field never writes).
getter/setter pairinherited
Methods
-
canUpdate(
Allocation next) → bool -
Whether this allocation can absorb
next's config in place, vs. the Host re-keying (dispose + recreate) — à la RenderObjectcanUpdate(D4). Update-vs-replace is a DOMAIN choice: a one-shot-pcoding agent replaces (false); a tmux session updates (true). Defaults to replace.inherited -
detach(
) → Future< void> -
LEAVE the live effect RUNNING and persist its handle so a later
startOrAdopt reattaches it (D4 — a per-type opt-in, isDetachable). A
DISTINCT verb, never an overloaded dispose (Nico's constraint). The base
throws so a non-detachable effect can never silently leak a process; the
Host only calls it for a detachable type.
inherited
-
dispose(
) → Future< void> -
KILL the live effect (the default / floor unmount verb): the effect is
done/invalidated. A process family terminates its group; a service cancels
its body + runs teardown.
override
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
startOrAdopt(
) → Future< void> -
Spawn a fresh effect OR prove-and-adopt a survivor at address (D4). The
engine owns only the stable address + no-adopt-on-faith (an adoptable
type must return proof of freshness; can't prove → spawn fresh). Reports
lifecycle through AllocationContext.sink. The Host guards the single kick.
override
-
toString(
) → String -
A string representation of this object.
inherited
-
update(
Allocation next) → Future< void> -
Mutate in place to serve
next's config (only called when canUpdate is true). Rebinds context tonext's. Defaults to a no-op rebind.inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited