kotlin-flow-extensions / hu.akarnokd.kotlin.flow / ReplaySubject / <init>

<init>

ReplaySubject()

Creates a ReplaySubject with an unbounded internal buffer caching all values received via emit.

ReplaySubject(maxSize: Int)

Creates a ReplaySubject that caches at most maxSize values to be replayed to late collectors.

ReplaySubject(maxTime: Long, unit: TimeUnit)

Creates a ReplaySubject that caches values at most for the given maxTime real-time duration and replays those upfront to late collectors.

ReplaySubject(maxSize: Int, maxTime: Long, unit: TimeUnit)

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(maxSize: Int, maxTime: Long, unit: TimeUnit, timeSource: (TimeUnit) -> Long)

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.