Class ObservableReplay.UnboundedReplayBuffer<T>
java.lang.Object
java.util.AbstractCollection<Object>
java.util.AbstractList<Object>
java.util.ArrayList<Object>
io.reactivex.rxjava3.internal.operators.observable.ObservableReplay.UnboundedReplayBuffer<T>
- Type Parameters:
T- the value type
- All Implemented Interfaces:
ObservableReplay.ReplayBuffer<T>, Serializable, Cloneable, Iterable<Object>, Collection<Object>, List<Object>, RandomAccess, SequencedCollection<Object>
- Enclosing class:
ObservableReplay<T>
static final class ObservableReplay.UnboundedReplayBuffer<T>
extends ArrayList<Object>
implements ObservableReplay.ReplayBuffer<T>
Holds an unbounded list of events.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final long(package private) intThe total number of events in the buffer.Fields inherited from class AbstractList
modCount -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomplete()Adds a completion event to the buffer.voidAdds a terminal exception to the buffer.voidAdds a regular value to the buffer.voidreplay(ObservableReplay.InnerDisposable<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 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 AbstractCollection
containsAll, toStringMethods inherited from interface Collection
parallelStream, stream, toArrayMethods inherited from interface List
containsAll, reversed
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
size
volatile int sizeThe total number of events in the buffer.
-
-
Constructor Details
-
UnboundedReplayBuffer
UnboundedReplayBuffer(int capacityHint)
-
-
Method Details
-
next
Description copied from interface:ObservableReplay.ReplayBufferAdds a regular value to the buffer.- Specified by:
nextin interfaceObservableReplay.ReplayBuffer<T>- Parameters:
value- the value to be stored in the buffer
-
error
Description copied from interface:ObservableReplay.ReplayBufferAdds a terminal exception to the buffer.- Specified by:
errorin interfaceObservableReplay.ReplayBuffer<T>- Parameters:
e- the error to be stored in the buffer
-
complete
public void complete()Description copied from interface:ObservableReplay.ReplayBufferAdds a completion event to the buffer.- Specified by:
completein interfaceObservableReplay.ReplayBuffer<T>
-
replay
Description copied from interface:ObservableReplay.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 interfaceObservableReplay.ReplayBuffer<T>- Parameters:
output- the receiver of the buffered events
-