Class ActionTracker
java.lang.Object
privbot.actions.confirm.ActionTracker
Tracks already-dispatched actions without a polling thread. Client reads run outside the tracker
monitor. Each terminal result is published once by
poll(), subject to the bounded buffer.
Independent of the blocking, retrying confirmation the Workflow Studio uses when it replays recorded actions.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongOverflow is observable; old terminal snapshots may be dropped, never changed into success.Capture before dispatch so a later registration cannot adopt an obsolete session's action.voidCancel all prior-generation handles on stop, disconnect, death, or session replacement.intpoll()Poll each retained action once, returning current pending and newly terminal observations.track(String label, DispatchStatus dispatch, Supplier<ProofState> proof, BooleanSupplier active, long timeoutMs) Record one dispatch.
-
Constructor Details
-
ActionTracker
public ActionTracker() -
ActionTracker
-
-
Method Details
-
guardCurrentGeneration
Capture before dispatch so a later registration cannot adopt an obsolete session's action. -
track
public ActionHandle track(String label, DispatchStatus dispatch, Supplier<ProofState> proof, BooleanSupplier active, long timeoutMs) Record one dispatch. Capture any before-state before dispatch, then supply a fresh proof read. An unacknowledged void attempt may confirm from game state but never gains an accepted receipt. At capacity the oldest pending handle is cancelled; completed handles remain terminal forever. -
poll
Poll each retained action once, returning current pending and newly terminal observations. -
invalidate
public void invalidate()Cancel all prior-generation handles on stop, disconnect, death, or session replacement. -
pendingCount
public int pendingCount() -
droppedTerminalCount
public long droppedTerminalCount()Overflow is observable; old terminal snapshots may be dropped, never changed into success.
-