Class AbstractWatchManager<T extends HasMetadata>

    • Method Detail

      • closeRequest

        public void closeRequest()
        Attempt to gracefully close the current request.

        If forceClosed has not been set, then it's expected that the watch will attempt to reconnect

      • setWatchEndCheckMs

        public void setWatchEndCheckMs​(int watchEndCheckMs)
      • closeCurrentRequest

        protected abstract void closeCurrentRequest()
      • startWatch

        protected void startWatch()
        Async start of the watch
      • onMessage

        protected void onMessage​(String message,
                                 AbstractWatchManager.WatchRequestState state,
                                 Runnable onComplete)
        Hand a freshly received frame off to the per-watch SerialExecutor for deserialization and dispatch, returning immediately. This keeps Jackson's deserializer-cold-path off the receive thread (the Vert.x event loop in the WebSocket path), where a single Pod-deep type warmup under CPU contention has been measured at tens of seconds and trips Vert.x's blocked-thread checker.

        onComplete runs after the body finishes (success or failure) and is the point where WebSocket flow control should be re-armed by the caller. Fire-and-forget dispatch without it would let frames pile up faster than the executor can drain. It is also fired synchronously when the serial executor has already been shut down by the time this call enters, covering the common termination path. Two narrow races remain (a shutdownNow() interleaved between this check and SerialExecutor.execute, or between execute and the wrapper's own shutdown check) where the runnable can be dropped; both can only happen at watch teardown where the WebSocket is closing and back-pressure re-arm is moot. The runnable must not be null; if it throws, the error is logged and swallowed so a broken re-arm cannot wedge the queue.

      • isWatching

        public boolean isWatching()