Interface Watcher<T>


  • public interface Watcher<T>
    • Method Detail

      • reconnecting

        default boolean reconnecting()
        If the Watcher can reconnect itself after an error

        Currently only used to indicate if the Watch should ignore the watch reconnect limit

        Returns:
      • eventReceived

        void eventReceived​(Watcher.Action action,
                           T resource)
        Handle the given event.

        Should not be implemented with long-running logic as that may lead to memory issues.

      • onClose

        default void onClose()
        Invoked when the watcher is gracefully closed.
      • onClose

        void onClose​(WatcherException cause)
        Invoked when the watcher closes due to an Exception.

        Should not be implemented with long-running logic as that may lead to memory issues.

        Parameters:
        cause - What caused the watcher to be closed.