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
Modifier and TypeMethodDescriptionvoid
void
boolean
compareAndSet
(Object expected, Object next) Atomically compares and sets the next terminal NotificationLite object if the current equals to the expected NotificationLite object.get()
Returns the terminal NotificationLite object or null if not yet terminated.getValue()
T[]
void
int
size()
void
trimHead()
Make sure an old inaccessible head value is released in a bounded buffer.
-
Method Details
-
add
-
addFinal
-
replay
-
size
int size() -
getValue
-
getValues
-
get
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
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.
-