ContextWindowRegistry class final
The per-model window registry. One instance per session, shared by the host (main + meter), the task executor (children) and any other consumer of the effective window for a model identity.
Constructors
Properties
-
entries
→ Map<
ModelWindowKey, RegisteredContextWindow> -
Read-only view for diagnostics/tests.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
clear(
) → void - Drops every registration (test seam; a host never calls this mid-session — E4 window shrinks arrive as new publishes).
-
isVerified(
Model model) → bool -
Whether
model's window is backed by an endpoint report or a user pin (AC6):falsemeans the carried window is unverified and the meters mark it. -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
publish(
{required Model model, required int window, required ContextWindowSource source, DateTime? at}) → void -
Publishes
windowformodel's identity. Later publishes win (an endpoint detection at boot, then a live/model-edit). Non-positive windows are ignored — they are never a resolution. -
remove(
Model model) → void -
Drops the registration row for
model's identity. The capability flow's UNPIN path (issue #1515) uses it: a userPin whose pin is gone must stop resolving — consumers fall back to the rebuilt model's carried window. clear stays the test seam (hosts drop ONE identity, never all; a mid-session E4 shrink arrives as a new publish, not a removal). -
toString(
) → String -
A string representation of this object.
inherited
-
windowFor(
Model model) → int? -
The registered window for
model's identity, ornullwhen nothing was published for it (the caller falls back to the carried value).
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited