Class FlowableReplay.UnboundedReplayBuffer<T>
- java.lang.Object
-
- java.util.AbstractCollection<E>
-
- java.util.AbstractList<E>
-
- java.util.ArrayList<java.lang.Object>
-
- io.reactivex.rxjava3.internal.operators.flowable.FlowableReplay.UnboundedReplayBuffer<T>
-
- Type Parameters:
T- the value type
- All Implemented Interfaces:
FlowableReplay.ReplayBuffer<T>,java.io.Serializable,java.lang.Cloneable,java.lang.Iterable<java.lang.Object>,java.util.Collection<java.lang.Object>,java.util.List<java.lang.Object>,java.util.RandomAccess
- Enclosing class:
- FlowableReplay<T>
static final class FlowableReplay.UnboundedReplayBuffer<T> extends java.util.ArrayList<java.lang.Object> implements FlowableReplay.ReplayBuffer<T>
Holds an unbounded list of events.
-
-
Field Summary
Fields Modifier and Type Field Description private static longserialVersionUID(package private) intsizeThe total number of events in the buffer.
-
Constructor Summary
Constructors Constructor Description UnboundedReplayBuffer(int capacityHint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcomplete()Adds a completion event to the buffer.voiderror(java.lang.Throwable e)Adds a terminal exception to the buffer.voidnext(T value)Adds a regular value to the buffer.voidreplay(FlowableReplay.InnerSubscription<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, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
-
-
-
-
Field Detail
-
serialVersionUID
private static final long serialVersionUID
- See Also:
- Constant Field Values
-
size
volatile int size
The total number of events in the buffer.
-
-
Method Detail
-
next
public void next(T value)
Description copied from interface:FlowableReplay.ReplayBufferAdds a regular value to the buffer.- Specified by:
nextin interfaceFlowableReplay.ReplayBuffer<T>- Parameters:
value- the next value to store
-
error
public void error(java.lang.Throwable e)
Description copied from interface:FlowableReplay.ReplayBufferAdds a terminal exception to the buffer.- Specified by:
errorin interfaceFlowableReplay.ReplayBuffer<T>- Parameters:
e- the Throwable instance
-
complete
public void complete()
Description copied from interface:FlowableReplay.ReplayBufferAdds a completion event to the buffer.- Specified by:
completein interfaceFlowableReplay.ReplayBuffer<T>
-
replay
public void replay(FlowableReplay.InnerSubscription<T> output)
Description copied from interface:FlowableReplay.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 interfaceFlowableReplay.ReplayBuffer<T>- Parameters:
output- the receiver of the events
-
-