Package tech.guilhermekaua.spigotboot.inventoryapi.internal.state
package tech.guilhermekaua.spigotboot.inventoryapi.internal.state
-
ClassDescriptionResolver from a public
ViewContextto its state backing; token impls never cast to concrete context classes, only toStateBackedContext.Internal seam exposing the table-assigned int id of a state token.Mutable state token bound fromViewArgumentsat open: the open phase validates the argument type and writes the value straight into the session'sStateStore.Read-only state token computed once per context on the first read and stored in the session'sStateStore; anullresult is cached via a private sentinel so the computation never re-runs for that context.Mutable per-context state token; values live in the session'sStateStore.Shared state token: one atomic value per view singleton, readable and writable from any thread.Seam between state token impls and context implementations: a context exposing the session's state store, owning view and liveness.Per-session state storage: an array indexed by token id plus the set of dirty token ids awaiting the next coalesced flush.Per-view registry of state tokens.