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) int
capacity
(package private) boolean
done
(package private) java.lang.Throwable
error
(package private) java.lang.Object[]
head
(package private) int
size
(package private) java.lang.Object[]
tail
(package private) int
tailIndex
-
Constructor Summary
Constructors Constructor Description ReplayUnboundedBuffer(int capacity)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete()
void
drain(ReplaySubject.ReplayProducer<T> rp)
java.lang.Throwable
error()
void
error(java.lang.Throwable e)
boolean
isComplete()
boolean
isEmpty()
T
last()
void
next(T t)
int
size()
T[]
toArray(T[] a)
-
-
-
Method Detail
-
next
public void next(T t)
- Specified by:
next
in interfaceReplaySubject.ReplayBuffer<T>
-
error
public void error(java.lang.Throwable e)
- Specified by:
error
in interfaceReplaySubject.ReplayBuffer<T>
-
complete
public void complete()
- Specified by:
complete
in interfaceReplaySubject.ReplayBuffer<T>
-
drain
public void drain(ReplaySubject.ReplayProducer<T> rp)
- Specified by:
drain
in interfaceReplaySubject.ReplayBuffer<T>
-
isComplete
public boolean isComplete()
- Specified by:
isComplete
in interfaceReplaySubject.ReplayBuffer<T>
-
error
public java.lang.Throwable error()
- Specified by:
error
in interfaceReplaySubject.ReplayBuffer<T>
-
last
public T last()
- Specified by:
last
in interfaceReplaySubject.ReplayBuffer<T>
-
size
public int size()
- Specified by:
size
in interfaceReplaySubject.ReplayBuffer<T>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfaceReplaySubject.ReplayBuffer<T>
-
toArray
public T[] toArray(T[] a)
- Specified by:
toArray
in interfaceReplaySubject.ReplayBuffer<T>
-
-