Package rx.internal.operators
Class OperatorReplay.UnboundedReplayBuffer<T>
- Type Parameters:
T- the value type
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<Object>,Collection<Object>,List<Object>,RandomAccess,SequencedCollection<Object>,OperatorReplay.ReplayBuffer<T>
- Enclosing class:
OperatorReplay<T>
static final class OperatorReplay.UnboundedReplayBuffer<T>
extends ArrayList<Object>
implements OperatorReplay.ReplayBuffer<T>
Holds an unbounded list of events.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final NotificationLite<T> private static final long(package private) intThe total number of events in the buffer.Fields inherited from class java.util.AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Adds a completion event to the buffervoidAdds a terminal exception to the buffervoidAdds a regular value to the buffer.voidreplay(OperatorReplay.InnerProducer<T> output) Tries to replay the buffered values to the subscriber inside the output if there is new value and requests available at the same time.Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, addFirst, addLast, clear, clone, contains, ensureCapacity, equals, forEach, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeIf, removeLast, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSizeMethods inherited from class java.util.AbstractCollection
containsAll, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, stream, toArrayMethods inherited from interface java.util.List
containsAll, reversed
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
nl
-
size
volatile int sizeThe total number of events in the buffer.
-
-
Constructor Details
-
UnboundedReplayBuffer
public UnboundedReplayBuffer(int capacityHint)
-
-
Method Details
-
next
Description copied from interface:OperatorReplay.ReplayBufferAdds a regular value to the buffer.- Specified by:
nextin interfaceOperatorReplay.ReplayBuffer<T>- Parameters:
value-
-
error
Description copied from interface:OperatorReplay.ReplayBufferAdds a terminal exception to the buffer- Specified by:
errorin interfaceOperatorReplay.ReplayBuffer<T>- Parameters:
e-
-
complete
public void complete()Description copied from interface:OperatorReplay.ReplayBufferAdds a completion event to the buffer- Specified by:
completein interfaceOperatorReplay.ReplayBuffer<T>
-
replay
Description copied from interface:OperatorReplay.ReplayBufferTries to replay the buffered values to the subscriber inside the output if there is new value and requests available at the same time.- Specified by:
replayin interfaceOperatorReplay.ReplayBuffer<T>- Parameters:
output-
-