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) boolean
void
call
(Subscriber<? super T> t) (package private) boolean
void
Notifies the Observer that theObservable
has finished sending push-based notifications.void
Notifies the Observer that theObservable
has experienced an error condition.void
Provides the Observer with a new item to observe.(package private) void
Methods 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:Observer
Provides the Observer with a new item to observe.The
Observable
may call this method 0 or more times.The
Observable
will not call this method again after it calls eitherObserver.onCompleted()
orObserver.onError(java.lang.Throwable)
. -
onError
Description copied from interface:Observer
Notifies the Observer that theObservable
has experienced an error condition.If the
Observable
calls this method, it will not thereafter callObserver.onNext(T)
orObserver.onCompleted()
. -
onCompleted
public void onCompleted()Description copied from interface:Observer
Notifies the Observer that theObservable
has finished sending push-based notifications.The
Observable
will not call this method if it callsObserver.onError(java.lang.Throwable)
.- Specified by:
onCompleted
in interfaceObserver<T>
-
isTerminated
boolean isTerminated()
-