java.lang.Object
tech.guilhermekaua.spigotboot.inventoryapi.internal.engine.phase.UpdatePhase

@Internal public final class UpdatePhase extends Object
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 Details

    • UpdatePhase

      public UpdatePhase(@NotNull @NotNull ViewEngine engine, @NotNull @NotNull SlotPainter painter)
      Creates the phase.
      Parameters:
      engine - the engine providing context plumbing
      painter - 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 — neither onUpdate nor a repaint runs on a torn-down session. Other non-active sessions skip every trigger except UpdateTrigger.STATE_CHANGE, which flushes are allowed to deliver to TRANSITIONING and OPENING sessions, and UpdateTrigger.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 update
      trigger - the cause of this pass
      dirtyOrNull - the dirty token ids restricting the repaint to their watchers, or null to repaint every component