Replay Subject
Caches and replays some or all items to collectors.
Constructors
ReplaySubject
Link copied to clipboard
fun ReplaySubject()
Content copied to clipboard
Creates a ReplaySubject with an unbounded internal buffer caching all values received via emit.
ReplaySubject
Link copied to clipboard
Creates a ReplaySubject that caches at most maxSize values to be replayed to late collectors.
ReplaySubject
Link copied to clipboard
Creates a ReplaySubject that caches values at most for the given maxTime real-time duration and replays those upfront to late collectors.
ReplaySubject
Link copied to clipboard
Creates a ReplaySubject that caches at most maxSize values at most for the given maxTime real-time duration and replays those upfront to late collectors.
ReplaySubject
Link copied to clipboard
fun ReplaySubject(maxSize: Int, maxTime: Long, unit: TimeUnit, timeSource: (TimeUnit) -> Long)
Content copied to clipboard
Creates a ReplaySubject that caches at most maxSize values at most for the given maxTime duration (measured via the custom timeSource) and replays those upfront to late collectors.
Functions
collectorCount
Link copied to clipboard
collectSafely
Link copied to clipboard
@FlowPreview()
Content copied to clipboard
Accepts a collector and emits the cached values upfront and any subsequent value received by this ReplaySubject until the ReplaySubject gets terminated.
hasCollectors
Link copied to clipboard