Class FlowableReplay.SizeAndTimeBoundReplayBuffer<T>
java.lang.Object
java.util.concurrent.atomic.AtomicReference<FlowableReplay.Node>
io.reactivex.rxjava3.internal.operators.flowable.FlowableReplay.BoundedReplayBuffer<T>
io.reactivex.rxjava3.internal.operators.flowable.FlowableReplay.SizeAndTimeBoundReplayBuffer<T>
- Type Parameters:
T
- the buffered value type
- All Implemented Interfaces:
FlowableReplay.ReplayBuffer<T>
,Serializable
- Enclosing class:
FlowableReplay<T>
static final class FlowableReplay.SizeAndTimeBoundReplayBuffer<T>
extends FlowableReplay.BoundedReplayBuffer<T>
Size and time bound replay buffer.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) final int
(package private) final long
(package private) final Scheduler
private static final long
(package private) final TimeUnit
Fields inherited from class io.reactivex.rxjava3.internal.operators.flowable.FlowableReplay.BoundedReplayBuffer
eagerTruncate, index, size, tail
-
Constructor Summary
ConstructorsConstructorDescriptionSizeAndTimeBoundReplayBuffer
(int limit, long maxAge, TimeUnit unit, Scheduler scheduler, boolean eagerTruncate) -
Method Summary
Modifier and TypeMethodDescription(package private) Object
enterTransform
(Object value, boolean terminal) Override this to wrap the NotificationLite object into a container to be used later by truncate.(package private) FlowableReplay.Node
getHead()
(package private) Object
leaveTransform
(Object value) Override this to unwrap the transformed value into a NotificationLite object.(package private) void
truncate()
Override this method to truncate a non-terminated buffer based on its current properties.(package private) void
Override this method to truncate a terminated buffer based on its properties (i.e., truncate but the very last node).Methods inherited from class io.reactivex.rxjava3.internal.operators.flowable.FlowableReplay.BoundedReplayBuffer
addLast, collect, complete, error, hasCompleted, hasError, next, removeFirst, removeSome, replay, setFirst, trimHead
Methods inherited from class java.util.concurrent.atomic.AtomicReference
accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
scheduler
-
maxAge
final long maxAge -
unit
-
limit
final int limit
-
-
Constructor Details
-
SizeAndTimeBoundReplayBuffer
-
-
Method Details
-
enterTransform
Description copied from class:FlowableReplay.BoundedReplayBuffer
Override this to wrap the NotificationLite object into a container to be used later by truncate.- Overrides:
enterTransform
in classFlowableReplay.BoundedReplayBuffer<T>
- Parameters:
value
- the value to transform into the internal representationterminal
- is this a terminal value?- Returns:
- the transformed value
-
leaveTransform
Description copied from class:FlowableReplay.BoundedReplayBuffer
Override this to unwrap the transformed value into a NotificationLite object.- Overrides:
leaveTransform
in classFlowableReplay.BoundedReplayBuffer<T>
- Parameters:
value
- the input value to transform to the external representation- Returns:
- the transformed value
-
truncate
void truncate()Description copied from class:FlowableReplay.BoundedReplayBuffer
Override this method to truncate a non-terminated buffer based on its current properties.- Specified by:
truncate
in classFlowableReplay.BoundedReplayBuffer<T>
-
truncateFinal
void truncateFinal()Description copied from class:FlowableReplay.BoundedReplayBuffer
Override this method to truncate a terminated buffer based on its properties (i.e., truncate but the very last node).- Overrides:
truncateFinal
in classFlowableReplay.BoundedReplayBuffer<T>
-
getHead
FlowableReplay.Node getHead()- Overrides:
getHead
in classFlowableReplay.BoundedReplayBuffer<T>
-