Package io.etcd.jetcd
Interface Watch
-
- All Superinterfaces:
java.lang.AutoCloseable,CloseableClient
public interface Watch extends CloseableClient
Interface of the watch client.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceWatch.ListenerInterface of Watcher.static interfaceWatch.Watcher
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description static Watch.Listenerlistener(java.util.function.Consumer<WatchResponse> onNext)static Watch.Listenerlistener(java.util.function.Consumer<WatchResponse> onNext, java.lang.Runnable onCompleted)static Watch.Listenerlistener(java.util.function.Consumer<WatchResponse> onNext, java.util.function.Consumer<java.lang.Throwable> onError)static Watch.Listenerlistener(java.util.function.Consumer<WatchResponse> onNext, java.util.function.Consumer<java.lang.Throwable> onError, java.lang.Runnable onCompleted)voidrequestProgress()Requests the latest revision processed for all watcher instancesWatch.Watcherwatch(ByteSequence key, WatchOption option, Watch.Listener listener)watch on a key with option.default Watch.Watcherwatch(ByteSequence key, WatchOption option, java.util.function.Consumer<WatchResponse> onNext)Watch key with option.default Watch.Watcherwatch(ByteSequence key, WatchOption option, java.util.function.Consumer<WatchResponse> onNext, java.lang.Runnable onCompleted)Watch key with option.default Watch.Watcherwatch(ByteSequence key, WatchOption option, java.util.function.Consumer<WatchResponse> onNext, java.util.function.Consumer<java.lang.Throwable> onError)Watch key with option.default Watch.Watcherwatch(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.default Watch.Watcherwatch(ByteSequence key, Watch.Listener listener)watch on a key.default Watch.Watcherwatch(ByteSequence key, java.util.function.Consumer<WatchResponse> onNext)Watch key.default Watch.Watcherwatch(ByteSequence key, java.util.function.Consumer<WatchResponse> onNext, java.lang.Runnable onCompleted)Watch key.default Watch.Watcherwatch(ByteSequence key, java.util.function.Consumer<WatchResponse> onNext, java.util.function.Consumer<java.lang.Throwable> onError)Watch key.default Watch.Watcherwatch(ByteSequence key, java.util.function.Consumer<WatchResponse> onNext, java.util.function.Consumer<java.lang.Throwable> onError, java.lang.Runnable onCompleted)Watch key.-
Methods inherited from interface io.etcd.jetcd.support.CloseableClient
close
-
-
-
-
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- seeWatchOption.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 consumeronError- 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 consumeronError- the on error consumeronCompleted- 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 consumeronCompleted- 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 optionsonNext- 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 optionsonNext- the on next consumeronError- 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 optionsonNext- the on next consumeronCompleted- 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 optionsonNext- the on next consumeronError- the on error consumeronCompleted- 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)
-
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.lang.Runnable onCompleted)
-
listener
static Watch.Listener listener(java.util.function.Consumer<WatchResponse> onNext, java.util.function.Consumer<java.lang.Throwable> onError, java.lang.Runnable onCompleted)
-
-