Interface WatchClient.Watch

All Superinterfaces:
AutoCloseable, Closeable
All Known Implementing Classes:
WatchBase
Enclosing interface:
WatchClient

public static interface WatchClient.Watch extends Closeable
Represents the watch.

Implementations should prefer to extend WatchBase

Callers should be aware that the await methods match against the current state only. For example, simply calling watch.await(STARTED) will not necessarily return as expected if the state quickly transitions from WatchClient.WatchState.INIT to WatchClient.WatchState.STARTED to WatchClient.WatchState.REGISTERED. Instead, it's more appropriate to call watch.await(EnumSet.of(STARTED, REGISTERED, COMPLETED, ERRORED), and to then check the returned state, or call wasStarted(), if necessary.