Package rx.subjects
Class ReplaySubject.ReplayUnboundedBuffer<T>
- java.lang.Object
-
- rx.subjects.ReplaySubject.ReplayUnboundedBuffer<T>
-
- Type Parameters:
T- the value type
- All Implemented Interfaces:
ReplaySubject.ReplayBuffer<T>
- Enclosing class:
- ReplaySubject<T>
static final class ReplaySubject.ReplayUnboundedBuffer<T> extends java.lang.Object implements ReplaySubject.ReplayBuffer<T>
An unbounded ReplayBuffer implementation that uses linked-arrays to avoid copy-on-grow situation with ArrayList.
-
-
Field Summary
Fields Modifier and Type Field Description (package private) intcapacity(package private) booleandone(package private) java.lang.Throwableerror(package private) java.lang.Object[]head(package private) intsize(package private) java.lang.Object[]tail(package private) inttailIndex
-
Constructor Summary
Constructors Constructor Description ReplayUnboundedBuffer(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete()voiddrain(ReplaySubject.ReplayProducer<T> rp)java.lang.Throwableerror()voiderror(java.lang.Throwable e)booleanisComplete()booleanisEmpty()Tlast()voidnext(T t)intsize()T[]toArray(T[] a)
-
-
-
Method Detail
-
next
public void next(T t)
- Specified by:
nextin interfaceReplaySubject.ReplayBuffer<T>
-
error
public void error(java.lang.Throwable e)
- Specified by:
errorin interfaceReplaySubject.ReplayBuffer<T>
-
complete
public void complete()
- Specified by:
completein interfaceReplaySubject.ReplayBuffer<T>
-
drain
public void drain(ReplaySubject.ReplayProducer<T> rp)
- Specified by:
drainin interfaceReplaySubject.ReplayBuffer<T>
-
isComplete
public boolean isComplete()
- Specified by:
isCompletein interfaceReplaySubject.ReplayBuffer<T>
-
error
public java.lang.Throwable error()
- Specified by:
errorin interfaceReplaySubject.ReplayBuffer<T>
-
last
public T last()
- Specified by:
lastin interfaceReplaySubject.ReplayBuffer<T>
-
size
public int size()
- Specified by:
sizein interfaceReplaySubject.ReplayBuffer<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfaceReplaySubject.ReplayBuffer<T>
-
toArray
public T[] toArray(T[] a)
- Specified by:
toArrayin interfaceReplaySubject.ReplayBuffer<T>
-
-