Top Fields Constructors Methods
org.reactfx

public abstract Class SuspendableBase<O, T, A>

extends ObservableBase<O, T>
implements Suspendable
Class Inheritance
All Implemented Interfaces
org.reactfx.Suspendable
Known Direct Subclasses
org.reactfx.SuspendableEventStreamBase, org.reactfx.collection.SuspendableListWrapper, org.reactfx.value.SuspendableValWrapper
Imports
org.reactfx.util.AccumulationFacility, .AccumulatorSize, .NotificationAccumulator

Field Summary

Modifier and TypeField and Description
private A
private final AccumulationFacility<T, A>
private boolean
private final EventStream<T>
private int

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
private void
handleEvent(T event)

protected abstract T
headOf(A accum)

protected A
protected final boolean
protected final Subscription
observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any.

protected A
reduce(A accum, T value)

private void
private void
protected abstract AccumulatorSize
sizeOf(A accum)

public final Guard
suspend()

Implements org.reactfx.Suspendable.suspend.

Suspends this suspendable object.

protected abstract A
tailOf(A accum)

Inherited from org.reactfx.ObservableBase:
addObserverenqueueNotificationsequalsforEachObservergetObserverCounthashCodeisObservingInputsnewObservernotifyObserversnotifyObserversobserveremoveObservertoString

Field Detail

accumulatedValueback to summary
private A accumulatedValue
afback to summary
private final AccumulationFacility<T, A> af
hasValueback to summary
private boolean hasValue
inputback to summary
private final EventStream<T> input
suspendedback to summary
private int suspended

Constructor Detail

SuspendableBaseback to summary
protected SuspendableBase(EventStream<T> input, NotificationAccumulator<O, T, A> pn)

Method Detail

handleEventback to summary
private void handleEvent(T event)
headOfback to summary
protected abstract T headOf(A accum)
initialAccumulatorback to summary
protected A initialAccumulator(T value)
isSuspendedback to summary
protected final boolean isSuspended()
observeInputsback to summary
protected final Subscription observeInputs()

Implements abstract org.reactfx.ObservableBase.observeInputs.

Doc from org.reactfx.ObservableBase.observeInputs.

Starts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called before newObserver(Object) is called for the first observer.

Annotations
@Override
reduceback to summary
protected A reduce(A accum, T value)
resetback to summary
private void reset()
resumeback to summary
private void resume()
sizeOfback to summary
protected abstract AccumulatorSize sizeOf(A accum)
suspendback to summary
public final Guard suspend()

Implements org.reactfx.Suspendable.suspend.

Doc from org.reactfx.Suspendable.suspend.

Suspends this suspendable object.

In 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.

Annotations
@Override
tailOfback to summary
protected abstract A tailOf(A accum)