ConcurrentSubject

Companion
class
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[A](multicast: MulticastStrategy[A])(s: Scheduler): ConcurrentSubject[A, A]
def apply[A](multicast: MulticastStrategy[A], overflow: Synchronous[A])(s: Scheduler): ConcurrentSubject[A, A]
def async[A](s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building async subjects.

Subject recipe for building async subjects.

def behavior[A](initial: A)(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building behavior subjects.

Subject recipe for building behavior subjects.

Value Params
initial

the initial element to emit on subscribe, before the first onNext happens

def behavior[A](initial: A, strategy: Synchronous[A])(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building behavior subjects.

Subject recipe for building behavior subjects.

Value Params
initial

the initial element to emit on subscribe, before the first onNext happens

strategy

the overflow strategy used for buffering, which specifies what to do in case we're dealing with slow consumers.

def from[I, O](p: Subject[I, O], overflowStrategy: Synchronous[I], producerType: ProducerSide)(s: Scheduler): ConcurrentSubject[I, O]

Wraps any Subject into a ConcurrentSubject.

Wraps any Subject into a ConcurrentSubject.

Value Params
overflowStrategy
  • the overflow strategy used for buffering, which specifies what to do in case we're dealing with slow consumers.
producerType

(UNSAFE) is the monix.execution.ChannelType.ProducerSide configuration, can be either multi producer (the safe default) or single producer, which can be configured for optimization purposes.

def publish[A](s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building publish subjects.

Subject recipe for building publish subjects.

def publish[A](strategy: Synchronous[A])(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building publish subjects.

Subject recipe for building publish subjects.

Value Params
strategy
  • the overflow strategy used for buffering, which specifies what to do in case we're dealing with slow consumers.
def publishToOne[A](s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building PublishToOneSubject.

Subject recipe for building PublishToOneSubject.

def publishToOne[A](strategy: Synchronous[A])(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building PublishToOneSubject.

Subject recipe for building PublishToOneSubject.

Value Params
strategy
  • the overflow strategy used for buffering, which specifies what to do in case we're dealing with slow consumers.
def replay[A](s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building replay subjects.

Subject recipe for building replay subjects.

def replay[A](strategy: Synchronous[A])(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building replay subjects.

Subject recipe for building replay subjects.

Value Params
strategy

the overflow strategy used for buffering, which specifies what to do in case we're dealing with slow consumers.

def replay[A](initial: Seq[A])(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building replay subjects.

Subject recipe for building replay subjects.

Value Params
initial

is an initial sequence of elements that will be pushed to subscribers before any elements emitted by the source.

def replay[A](initial: Seq[A], strategy: Synchronous[A])(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building replay subjects.

Subject recipe for building replay subjects.

Value Params
initial

is an initial sequence of elements that will be pushed to subscribers before any elements emitted by the source.

strategy

the overflow strategy used for buffering, which specifies what to do in case we're dealing with slow consumers.

def replayLimited[A](capacity: Int)(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building replay subjects. This variant creates a size-bounded replay subject.

Subject recipe for building replay subjects. This variant creates a size-bounded replay subject.

In this setting, the replay subject with a maximum capacity for its internal buffer and discards the oldest item. The capacity given is a guideline. The underlying implementation may decide to optimize it (e.g. use the next power of 2 greater or equal to the given value).

Value Params
capacity

indicates the minimum capacity of the underlying buffer, with the implementation being free to increase it.

def replayLimited[A](capacity: Int, strategy: Synchronous[A])(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building replay subjects. This variant creates a size-bounded replay subject.

Subject recipe for building replay subjects. This variant creates a size-bounded replay subject.

In this setting, the replay subject with a maximum capacity for its internal buffer and discards the oldest item. The capacity given is a guideline. The underlying implementation may decide to optimize it (e.g. use the next power of 2 greater or equal to the given value).

Value Params
capacity

indicates the minimum capacity of the underlying buffer, with the implementation being free to increase it.

strategy

the overflow strategy used for buffering, which specifies what to do in case we're dealing with slow consumers.

def replayLimited[A](capacity: Int, initial: Seq[A])(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building replay subjects. This variant creates a size-bounded replay subject.

Subject recipe for building replay subjects. This variant creates a size-bounded replay subject.

In this setting, the replay subject with a maximum capacity for its internal buffer and discards the oldest item. The capacity given is a guideline. The underlying implementation may decide to optimize it (e.g. use the next power of 2 greater or equal to the given value).

Value Params
capacity

indicates the minimum capacity of the underlying buffer, with the implementation being free to increase it.

initial

is an initial sequence of elements to prepopulate the buffer.

def replayLimited[A](capacity: Int, initial: Seq[A], strategy: Synchronous[A])(s: Scheduler): ConcurrentSubject[A, A]

Subject recipe for building replay subjects. This variant creates a size-bounded replay subject.

Subject recipe for building replay subjects. This variant creates a size-bounded replay subject.

In this setting, the replay subject with a maximum capacity for its internal buffer and discards the oldest item. The capacity given is a guideline. The underlying implementation may decide to optimize it (e.g. use the next power of 2 greater or equal to the given value).

Value Params
capacity

indicates the minimum capacity of the underlying buffer, with the implementation being free to increase it.

initial

is an initial sequence of elements to prepopulate the buffer.

strategy

the overflow strategy used for buffering, which specifies what to do in case we're dealing with slow consumers.

def toReactiveProcessor[I, O](source: ConcurrentSubject[I, O], bufferSize: Int)(s: Scheduler): Processor[I, O]

Transforms the source ConcurrentSubject into a org.reactivestreams.Processor instance as defined by the Reactive Streams specification.

Transforms the source ConcurrentSubject into a org.reactivestreams.Processor instance as defined by the Reactive Streams specification.

Value Params
bufferSize

a strictly positive number, representing the size of the buffer used and the number of elements requested on each cycle when communicating demand, compliant with the reactive streams specification