Package com.couchbase.client.core.util
Interface LatestStateSubscription.AsyncSubscriber<T>
- Enclosing class:
LatestStateSubscription<T>
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidhookOnFinally(reactor.core.publisher.SignalType signalType) Called exactly once when the upstream flux terminates, regardless of whether it completed, errored, or was cancelled.voidhookOnNext(T value, Runnable doFinally) Handles a value, typically by launching an asynchronous task.
-
Method Details
-
hookOnNext
Handles a value, typically by launching an asynchronous task. Must rundoFinallywhen the task is complete.- Parameters:
value- Most recent value from the upstream Flux.doFinally- Callback to run after asynchronous processing is complete.
-
hookOnFinally
default void hookOnFinally(reactor.core.publisher.SignalType signalType) Called exactly once when the upstream flux terminates, regardless of whether it completed, errored, or was cancelled. No further values will be processed after this.- Parameters:
signalType- the terminal signal from the upstream flux.
-