public abstract class SuspendableBase<O,T,A> extends ObservableBase<O,T> implements Suspendable
| Modifier | Constructor and Description |
|---|---|
protected |
SuspendableBase(EventStream<T> input,
NotificationAccumulator<O,T,A> pn) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract T |
headOf(A accum) |
protected A |
initialAccumulator(T value) |
protected boolean |
isSuspended() |
protected Subscription |
observeInputs()
Starts observing this observable's input(s), if any.
|
protected A |
reduce(A accum,
T value) |
protected abstract AccumulatorSize |
sizeOf(A accum) |
Guard |
suspend()
Suspends this suspendable object.
|
protected abstract A |
tailOf(A accum) |
addObserver, enqueueNotifications, equals, forEachObserver, getObserverCount, hashCode, isObservingInputs, newObserver, notifyObservers, notifyObservers, observe, removeObserver, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitcombine, suspendWhen, suspendWhile, suspendWhiledefaultEquals, defaultHashCode, defaultNotificationAccumulator, defaultToStringprotected SuspendableBase(EventStream<T> input, NotificationAccumulator<O,T,A> pn)
protected abstract AccumulatorSize sizeOf(A accum)
protected final boolean isSuspended()
public final Guard suspend()
SuspendableIn case of suspendable Observable,
suspends notification delivery for this observable object.
Notifications produced while suspended may be queued for later delivery,
accumulated into a single cumulative notification, or discarded
completely, depending on the concrete implementation.
suspend in interface SuspendableThe returned Guard is AutoCloseable, which makes it
convenient to use in try-with-resources.
protected final Subscription observeInputs()
ObservableBaseObservableBase.newObserver(Object)
is called for the first observer.observeInputs in class ObservableBase<O,T>