Package rx.internal.operators
Class OperatorReplay.SizeAndTimeBoundReplayBuffer<T>
java.lang.Object
java.util.concurrent.atomic.AtomicReference<OperatorReplay.Node>
rx.internal.operators.OperatorReplay.BoundedReplayBuffer<T>
rx.internal.operators.OperatorReplay.SizeAndTimeBoundReplayBuffer<T>
- Type Parameters:
T- the buffered value type
- All Implemented Interfaces:
Serializable,OperatorReplay.ReplayBuffer<T>
- Enclosing class:
OperatorReplay<T>
static final class OperatorReplay.SizeAndTimeBoundReplayBuffer<T>
extends OperatorReplay.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 longFields inherited from class rx.internal.operators.OperatorReplay.BoundedReplayBuffer
index, nl, size, tail -
Constructor Summary
ConstructorsConstructorDescriptionSizeAndTimeBoundReplayBuffer(int limit, long maxAgeInMillis, Scheduler scheduler) -
Method Summary
Modifier and TypeMethodDescription(package private) ObjectenterTransform(Object value) Override this to wrap the NotificationLite object into a container to be used later by truncate.(package private) OperatorReplay.NodeReturns the current head for initializing the replay location for a new subscriber.(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 rx.internal.operators.OperatorReplay.BoundedReplayBuffer
addLast, collect, complete, error, hasCompleted, hasError, next, removeFirst, removeSome, replay, setFirstMethods 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
-
maxAgeInMillis
final long maxAgeInMillis -
limit
final int limit
-
-
Constructor Details
-
SizeAndTimeBoundReplayBuffer
-
-
Method Details
-
enterTransform
Description copied from class:OperatorReplay.BoundedReplayBufferOverride this to wrap the NotificationLite object into a container to be used later by truncate.- Overrides:
enterTransformin classOperatorReplay.BoundedReplayBuffer<T>- Parameters:
value-- Returns:
-
leaveTransform
Description copied from class:OperatorReplay.BoundedReplayBufferOverride this to unwrap the transformed value into a NotificationLite object.- Overrides:
leaveTransformin classOperatorReplay.BoundedReplayBuffer<T>- Parameters:
value-- Returns:
-
getInitialHead
OperatorReplay.Node getInitialHead()Description copied from class:OperatorReplay.BoundedReplayBufferReturns the current head for initializing the replay location for a new subscriber. Override it to consider linked but outdated elements.- Overrides:
getInitialHeadin classOperatorReplay.BoundedReplayBuffer<T>- Returns:
- the current head
-
truncate
void truncate()Description copied from class:OperatorReplay.BoundedReplayBufferOverride this method to truncate a non-terminated buffer based on its current properties.- Overrides:
truncatein classOperatorReplay.BoundedReplayBuffer<T>
-
truncateFinal
void truncateFinal()Description copied from class:OperatorReplay.BoundedReplayBufferOverride this method to truncate a terminated buffer based on its properties (i.e., truncate but the very last node).- Overrides:
truncateFinalin classOperatorReplay.BoundedReplayBuffer<T>
-