monix.reactive.observables

Type members

Classlikes

final class CachedObservable[+A] extends Observable[A]

A CachedObservable is an observable that wraps a regular Observable, initiating the connection on the first subscribe() and then staying connected for as long as the source is emitting.

A CachedObservable is an observable that wraps a regular Observable, initiating the connection on the first subscribe() and then staying connected for as long as the source is emitting.

NOTE: this is NOT a ConnectableObservable and being a hot data-source you've got no way to cancel the source.

Value Params
maxCapacity
  • the buffer capacity, or 0 for usage of an unbounded buffer
source
  • the observable we are wrapping
Companion
object
Companion
class
abstract class ChainedObservable[+A] extends Observable[A]

A StackedObservable is an Observable type used in operators that end up being used in loops and that need to be memory safe (e.g. ++, suspend).

A StackedObservable is an Observable type used in operators that end up being used in loops and that need to be memory safe (e.g. ++, suspend).

This is achieved with the same trick used in the monix.eval.Task implementation. The problem with recursive operators is that they are leaving work behind due to the need to return a Cancelable and thus leak memory.

As a general rule of thumb, not all observables can be chain-able. For example if the received Subscriber gets wrapped in another subscriber instance, then chaining will not be safe unless the onNext, onError and onComplete events introduce asynchronous boundaries as well, which is overkill.

Companion
object
Companion
class
object CombineObservable extends Newtype1[[A] =>> Observable[A]]

Newtype encoding for an Observable datatype that has a cats.Apply instance which uses Observable.combineLatest to combine elements needed for implementing cats.NonEmptyParallel

Newtype encoding for an Observable datatype that has a cats.Apply instance which uses Observable.combineLatest to combine elements needed for implementing cats.NonEmptyParallel

@UnsafeBecauseImpure
abstract class ConnectableObservable[+A] extends Observable[A]

Represents an Observable that waits for the call to connect() before starting to emit elements to its subscriber(s).

Represents an Observable that waits for the call to connect() before starting to emit elements to its subscriber(s).

Represents a hot observable (an observable that shares its data-source to multiple subscribers).

Companion
object
abstract class GroupedObservable[K, +V] extends Observable[V]

A GroupedObservable is an observable type generated by Observable.groupBy. It has the following properties:

A GroupedObservable is an observable type generated by Observable.groupBy. It has the following properties:

  • comes accompanied with a key property after which the grouping was made

  • supports a single subscriber, throwing IllegalStateException if you attempt multiple subscriptions

Companion
object
Companion
class
final class RefCountObservable[+A] extends Observable[A]

A RefCountObservable is an observable that wraps a ConnectableObservable, initiating the connection on the first subscribe() and then staying connected as long as there is at least one subscription active.

A RefCountObservable is an observable that wraps a ConnectableObservable, initiating the connection on the first subscribe() and then staying connected as long as there is at least one subscription active.

Value Params
source
  • the connectable observable we are wrapping
Companion
object
Companion
class