Package io.reactivex.rxjava3.processors
Class ReplayProcessor.SizeBoundReplayBuffer<T>
- java.lang.Object
-
- io.reactivex.rxjava3.processors.ReplayProcessor.SizeBoundReplayBuffer<T>
-
- All Implemented Interfaces:
ReplayProcessor.ReplayBuffer<T>
- Enclosing class:
- ReplayProcessor<T>
static final class ReplayProcessor.SizeBoundReplayBuffer<@NonNull 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.Node<T>
head
(package private) int
maxSize
(package private) int
size
(package private) ReplayProcessor.Node<T>
tail
-
Constructor Summary
Constructors Constructor Description SizeBoundReplayBuffer(int maxSize)
-
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()
T
getValue()
T[]
getValues(@NonNull T[] array)
boolean
isDone()
void
next(@NonNull T value)
void
replay(ReplayProcessor.ReplaySubscription<@NonNull T> rs)
int
size()
(package private) void
trim()
void
trimHead()
Make sure an old inaccessible head value is released in a bounded buffer.
-
-
-
Field Detail
-
maxSize
final int maxSize
-
size
int size
-
head
volatile ReplayProcessor.Node<T> head
-
tail
ReplayProcessor.Node<T> tail
-
error
java.lang.Throwable error
-
done
volatile boolean done
-
-
Method Detail
-
trim
void trim()
-
next
public void next(@NonNull 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>
-
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>
-
isDone
public boolean isDone()
- Specified by:
isDone
in interfaceReplayProcessor.ReplayBuffer<T>
-
getError
public java.lang.Throwable getError()
- Specified by:
getError
in interfaceReplayProcessor.ReplayBuffer<T>
-
getValue
public T getValue()
- Specified by:
getValue
in interfaceReplayProcessor.ReplayBuffer<T>
-
getValues
public T[] getValues(@NonNull T[] array)
- Specified by:
getValues
in interfaceReplayProcessor.ReplayBuffer<T>
-
replay
public void replay(ReplayProcessor.ReplaySubscription<@NonNull T> rs)
- Specified by:
replay
in interfaceReplayProcessor.ReplayBuffer<T>
-
size
public int size()
- Specified by:
size
in interfaceReplayProcessor.ReplayBuffer<T>
-
-