Package io.etcd.jetcd

Interface Watch

    • Method Detail

      • watch

        Watch.Watcher watch​(ByteSequence key,
                            WatchOption option,
                            Watch.Listener listener)
        watch on a key with option.
        Parameters:
        key - key to be watched on.
        option - see WatchOption.
        listener - the event consumer
        Returns:
        this watcher
        Throws:
        io.etcd.jetcd.common.exception.ClosedClientException - if watch client has been closed.
      • watch

        default Watch.Watcher watch​(ByteSequence key,
                                    Watch.Listener listener)
        watch on a key.
        Parameters:
        key - key to be watched on.
        listener - the event consumer
        Returns:
        this watcher
        Throws:
        io.etcd.jetcd.common.exception.ClosedClientException - if watch client has been closed.
      • watch

        default Watch.Watcher watch​(ByteSequence key,
                                    java.util.function.Consumer<WatchResponse> onNext)
        Watch key.
        Parameters:
        key - key to be watched on.
        onNext - the on next consumer
        Returns:
        this watcher
      • watch

        default Watch.Watcher watch​(ByteSequence key,
                                    java.util.function.Consumer<WatchResponse> onNext,
                                    java.util.function.Consumer<java.lang.Throwable> onError)
        Watch key.
        Parameters:
        key - key to be watched on.
        onNext - the on next consumer
        onError - the on error consumer
        Returns:
        this watcher
      • watch

        default Watch.Watcher watch​(ByteSequence key,
                                    java.util.function.Consumer<WatchResponse> onNext,
                                    java.util.function.Consumer<java.lang.Throwable> onError,
                                    java.lang.Runnable onCompleted)
        Watch key.
        Parameters:
        key - key to be watched on.
        onNext - the on next consumer
        onError - the on error consumer
        onCompleted - the on completion consumer
        Returns:
        this watcher
      • watch

        default Watch.Watcher watch​(ByteSequence key,
                                    java.util.function.Consumer<WatchResponse> onNext,
                                    java.lang.Runnable onCompleted)
        Watch key.
        Parameters:
        key - key to be watched on.
        onNext - the on next consumer
        onCompleted - the on completion consumer
        Returns:
        this watcher
      • watch

        default Watch.Watcher watch​(ByteSequence key,
                                    WatchOption option,
                                    java.util.function.Consumer<WatchResponse> onNext)
        Watch key with option.
        Parameters:
        key - key to be watched on.
        option - the options
        onNext - the on next consumer
        Returns:
        this watcher
      • watch

        default Watch.Watcher watch​(ByteSequence key,
                                    WatchOption option,
                                    java.util.function.Consumer<WatchResponse> onNext,
                                    java.util.function.Consumer<java.lang.Throwable> onError)
        Watch key with option.
        Parameters:
        key - key to be watched on.
        option - the options
        onNext - the on next consumer
        onError - the on error consumer
        Returns:
        this watcher
      • watch

        default Watch.Watcher watch​(ByteSequence key,
                                    WatchOption option,
                                    java.util.function.Consumer<WatchResponse> onNext,
                                    java.lang.Runnable onCompleted)
        Watch key with option.
        Parameters:
        key - key to be watched on.
        option - the options
        onNext - the on next consumer
        onCompleted - the on completion consumer
        Returns:
        this watcher
      • watch

        default Watch.Watcher watch​(ByteSequence key,
                                    WatchOption option,
                                    java.util.function.Consumer<WatchResponse> onNext,
                                    java.util.function.Consumer<java.lang.Throwable> onError,
                                    java.lang.Runnable onCompleted)
        Watch key with option.
        Parameters:
        key - key to be watched on.
        option - the options
        onNext - the on next consumer
        onError - the on error consumer
        onCompleted - the on completion consumer
        Returns:
        this watcher
      • requestProgress

        void requestProgress()
        Requests the latest revision processed for all watcher instances
      • listener

        static Watch.Listener listener​(java.util.function.Consumer<WatchResponse> onNext,
                                       java.util.function.Consumer<java.lang.Throwable> onError)
      • listener

        static Watch.Listener listener​(java.util.function.Consumer<WatchResponse> onNext,
                                       java.util.function.Consumer<java.lang.Throwable> onError,
                                       java.lang.Runnable onCompleted)