Package io.deephaven.kv
Interface WatchClient.Listener
- Enclosing interface:
- WatchClient
public static interface WatchClient.Listener
Interface for receiving
WatchResponses.
Users should prefer to use WatchClient.UnitListener when applicable.
The main implementation for this interface is etcd's listener, which is backed by io.grpc.stub.StreamObserver. We are assuming the semantics of that interface.
-
Method Summary
Modifier and TypeMethodDescriptionvoidInvoked on completion.voidInvoked on errors.voidonNextWatchResponse(@NotNull WatchResponse response) Invoked on new events.default voidNotifies the client that the listener received the registration event.
-
Method Details
-
onRegistration
default void onRegistration()Notifies the client that the listener received the registration event. -
onNextWatchResponse
Invoked on new events.Can be called many times but is never called after
onError(Throwable)oronCompleted()are called.- Parameters:
response- the response
-
onError
Invoked on errors.May only be called once and if called it must be the last method called.
- Parameters:
throwable- the error
-
onCompleted
void onCompleted()Invoked on completion.May only be called once and if called it must be the last method called.
-