Package rx.subjects
Class ReplaySubject.ReplayState<T>
java.lang.Object
java.util.concurrent.atomic.AtomicReference<ReplaySubject.ReplayProducer<T>[]>
rx.subjects.ReplaySubject.ReplayState<T>
- Type Parameters:
T- the value type
- All Implemented Interfaces:
Serializable,Action,Action1<Subscriber<? super T>>,Function,Observable.OnSubscribe<T>,Observer<T>
- Enclosing class:
ReplaySubject<T>
static final class ReplaySubject.ReplayState<T>
extends AtomicReference<ReplaySubject.ReplayProducer<T>[]>
implements Observable.OnSubscribe<T>, Observer<T>
Holds onto the array of Subscriber-wrapping ReplayProducers and
the buffer that holds values to be replayed; it manages
subscription and signal dispatching.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final ReplaySubject.ReplayBuffer<T> (package private) static final ReplaySubject.ReplayProducer[]private static final long(package private) static final ReplaySubject.ReplayProducer[] -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) booleanvoidcall(Subscriber<? super T> t) (package private) booleanvoidNotifies the Observer that theObservablehas finished sending push-based notifications.voidNotifies the Observer that theObservablehas experienced an error condition.voidProvides the Observer with a new item to observe.(package private) voidMethods inherited from class java.util.concurrent.atomic.AtomicReference
accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
buffer
-
EMPTY
-
TERMINATED
-
-
Constructor Details
-
ReplayState
-
-
Method Details
-
call
-
add
-
remove
-
onNext
Description copied from interface:ObserverProvides the Observer with a new item to observe.The
Observablemay call this method 0 or more times.The
Observablewill not call this method again after it calls eitherObserver.onCompleted()orObserver.onError(java.lang.Throwable). -
onError
Description copied from interface:ObserverNotifies the Observer that theObservablehas experienced an error condition.If the
Observablecalls this method, it will not thereafter callObserver.onNext(T)orObserver.onCompleted(). -
onCompleted
public void onCompleted()Description copied from interface:ObserverNotifies the Observer that theObservablehas finished sending push-based notifications.The
Observablewill not call this method if it callsObserver.onError(java.lang.Throwable).- Specified by:
onCompletedin interfaceObserver<T>
-
isTerminated
boolean isTerminated()
-