Package io.reactivex.rxjava3.processors
Class ReplayProcessor.SizeAndTimeBoundReplayBuffer<T>
- java.lang.Object
-
- io.reactivex.rxjava3.processors.ReplayProcessor.SizeAndTimeBoundReplayBuffer<T>
-
- All Implemented Interfaces:
ReplayProcessor.ReplayBuffer<T>
- Enclosing class:
- ReplayProcessor<T>
static final class ReplayProcessor.SizeAndTimeBoundReplayBuffer<T> extends java.lang.Object implements ReplayProcessor.ReplayBuffer<T>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) boolean
done
(package private) java.lang.Throwable
error
(package private) ReplayProcessor.TimedNode<T>
head
(package private) long
maxAge
(package private) int
maxSize
(package private) Scheduler
scheduler
(package private) int
size
(package private) ReplayProcessor.TimedNode<T>
tail
(package private) java.util.concurrent.TimeUnit
unit
-
Constructor Summary
Constructors Constructor Description SizeAndTimeBoundReplayBuffer(int maxSize, long maxAge, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
complete()
void
error(java.lang.Throwable ex)
java.lang.Throwable
getError()
(package private) ReplayProcessor.TimedNode<T>
getHead()
T
getValue()
T[]
getValues(T[] array)
boolean
isDone()
void
next(T value)
void
replay(ReplayProcessor.ReplaySubscription<T> rs)
int
size()
(package private) int
size(ReplayProcessor.TimedNode<T> h)
(package private) void
trim()
(package private) void
trimFinal()
void
trimHead()
Make sure an old inaccessible head value is released in a bounded buffer.
-
-
-
Field Detail
-
maxSize
final int maxSize
-
maxAge
final long maxAge
-
unit
final java.util.concurrent.TimeUnit unit
-
scheduler
final Scheduler scheduler
-
size
int size
-
head
volatile ReplayProcessor.TimedNode<T> head
-
tail
ReplayProcessor.TimedNode<T> tail
-
error
java.lang.Throwable error
-
done
volatile boolean done
-
-
Constructor Detail
-
SizeAndTimeBoundReplayBuffer
SizeAndTimeBoundReplayBuffer(int maxSize, long maxAge, java.util.concurrent.TimeUnit unit, Scheduler scheduler)
-
-
Method Detail
-
trim
void trim()
-
trimFinal
void trimFinal()
-
trimHead
public void trimHead()
Description copied from interface:ReplayProcessor.ReplayBuffer
Make sure an old inaccessible head value is released in a bounded buffer.- Specified by:
trimHead
in interfaceReplayProcessor.ReplayBuffer<T>
-
next
public void next(T value)
- Specified by:
next
in interfaceReplayProcessor.ReplayBuffer<T>
-
error
public void error(java.lang.Throwable ex)
- Specified by:
error
in interfaceReplayProcessor.ReplayBuffer<T>
-
complete
public void complete()
- Specified by:
complete
in interfaceReplayProcessor.ReplayBuffer<T>
-
getValue
@Nullable public T getValue()
- Specified by:
getValue
in interfaceReplayProcessor.ReplayBuffer<T>
-
getValues
public T[] getValues(T[] array)
- Specified by:
getValues
in interfaceReplayProcessor.ReplayBuffer<T>
-
getHead
ReplayProcessor.TimedNode<T> getHead()
-
replay
public void replay(ReplayProcessor.ReplaySubscription<T> rs)
- Specified by:
replay
in interfaceReplayProcessor.ReplayBuffer<T>
-
size
public int size()
- Specified by:
size
in interfaceReplayProcessor.ReplayBuffer<T>
-
size
int size(ReplayProcessor.TimedNode<T> h)
-
getError
public java.lang.Throwable getError()
- Specified by:
getError
in interfaceReplayProcessor.ReplayBuffer<T>
-
isDone
public boolean isDone()
- Specified by:
isDone
in interfaceReplayProcessor.ReplayBuffer<T>
-
-