Package io.reactivex.rxjava3.subjects
Interface ReplaySubject.ReplayBuffer<T>
-
- Type Parameters:
T
- the value type
- All Known Implementing Classes:
ReplaySubject.SizeAndTimeBoundReplayBuffer
,ReplaySubject.SizeBoundReplayBuffer
,ReplaySubject.UnboundedReplayBuffer
- Enclosing class:
- ReplaySubject<T>
static interface ReplaySubject.ReplayBuffer<T>
Abstraction over a buffer that receives events and replays them to individual Observers.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
add(T value)
void
addFinal(java.lang.Object notificationLite)
boolean
compareAndSet(java.lang.Object expected, java.lang.Object next)
Atomically compares and sets the next terminal NotificationLite object if the current equals to the expected NotificationLite object.java.lang.Object
get()
Returns the terminal NotificationLite object or null if not yet terminated.T
getValue()
T[]
getValues(T[] array)
void
replay(ReplaySubject.ReplayDisposable<T> rs)
int
size()
void
trimHead()
Make sure an old inaccessible head value is released in a bounded buffer.
-
-
-
Method Detail
-
add
void add(T value)
-
addFinal
void addFinal(java.lang.Object notificationLite)
-
replay
void replay(ReplaySubject.ReplayDisposable<T> rs)
-
size
int size()
-
get
java.lang.Object get()
Returns the terminal NotificationLite object or null if not yet terminated.- Returns:
- the terminal NotificationLite object or null if not yet terminated
-
compareAndSet
boolean compareAndSet(java.lang.Object expected, java.lang.Object next)
Atomically compares and sets the next terminal NotificationLite object if the current equals to the expected NotificationLite object.- Parameters:
expected
- the expected NotificationLite objectnext
- the next NotificationLite object- Returns:
- true if successful
-
trimHead
void trimHead()
Make sure an old inaccessible head value is released in a bounded buffer.
-
-