UnicastSubject

fun <T> UnicastSubject(bufferSize: Int = Int.MAX_VALUE, onTerminate: () -> Unit = {}): UnicastSubject<T>

Create a new instance of UnicastSubject.

Parameters

bufferSize

the maximum number of elements that the returned UnicastSubject will store and replay, default value is Int.MAX_VALUE

onTerminate

called when the returned UnicastSubject receives a terminal event (onComplete or onError)