Class UpdatePhase
java.lang.Object
tech.guilhermekaua.spigotboot.inventoryapi.internal.engine.phase.UpdatePhase
Update pass: invokes
View.onUpdate with the trigger, then repaints components —
all of them plus every pagination area on a full pass, or only the watchers of a dirty
token set (plus dirty pagination areas and their element watchers) during a scoped
flush. An onUpdate failure is logged and the repaint still runs (§9 error table).-
Constructor Summary
ConstructorsConstructorDescriptionUpdatePhase(@NotNull ViewEngine engine, @NotNull SlotPainter painter) Creates the phase. -
Method Summary
Modifier and TypeMethodDescriptionvoidupdate(@NotNull ViewSession session, @NotNull UpdateTrigger trigger, @Nullable Set<Integer> dirtyOrNull) Runs one update pass on a session.
-
Constructor Details
-
UpdatePhase
Creates the phase.- Parameters:
engine- the engine providing context plumbingpainter- the slot painter writing repaint results
-
-
Method Details
-
update
public void update(@NotNull @NotNull ViewSession session, @NotNull @NotNull UpdateTrigger trigger, @Nullable @Nullable Set<Integer> dirtyOrNull) Runs one update pass on a session. CLOSED sessions are skipped entirely — neitheronUpdatenor a repaint runs on a torn-down session. Other non-active sessions skip every trigger exceptUpdateTrigger.STATE_CHANGE, which flushes are allowed to deliver to TRANSITIONING and OPENING sessions, andUpdateTrigger.PAGINATION_SETTLE, which is delivered to TRANSITIONING sessions only — a page settling while a deferred navigation is pending still paints, while OPENING sessions never observe a settle pass (spec §7).- Parameters:
session- the session to updatetrigger- the cause of this passdirtyOrNull- the dirty token ids restricting the repaint to their watchers, ornullto repaint every component
-