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 Schedulerprivate static final long(package private) final TimeUnitFields inherited from class 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) ObjectenterTransform(Object value, boolean terminal) Override this to wrap the NotificationLite object into a container to be used later by truncate.(package private) FlowableReplay.NodegetHead()(package private) ObjectleaveTransform(Object value) Override this to unwrap the transformed value into a NotificationLite object.(package private) voidtruncate()Override this method to truncate a non-terminated buffer based on its current properties.(package private) voidOverride this method to truncate a terminated buffer based on its properties (i.e., truncate but the very last node).Methods inherited from class FlowableReplay.BoundedReplayBuffer
addLast, collect, complete, error, hasCompleted, hasError, next, removeFirst, removeSome, replay, setFirst, trimHeadMethods inherited from class 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.BoundedReplayBufferOverride this to wrap the NotificationLite object into a container to be used later by truncate.- Overrides:
enterTransformin 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.BoundedReplayBufferOverride this to unwrap the transformed value into a NotificationLite object.- Overrides:
leaveTransformin 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.BoundedReplayBufferOverride this method to truncate a non-terminated buffer based on its current properties.- Specified by:
truncatein classFlowableReplay.BoundedReplayBuffer<T>
-
truncateFinal
void truncateFinal()Description copied from class:FlowableReplay.BoundedReplayBufferOverride this method to truncate a terminated buffer based on its properties (i.e., truncate but the very last node).- Overrides:
truncateFinalin classFlowableReplay.BoundedReplayBuffer<T>
-
getHead
FlowableReplay.Node getHead()- Overrides:
getHeadin classFlowableReplay.BoundedReplayBuffer<T>
-