Packages

c

org.mongodb.scala.ObservableImplicits

SingleObservableFuture

implicit class SingleObservableFuture[T] extends AnyRef

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SingleObservableFuture
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new SingleObservableFuture(obs: => SingleObservable[T])

Value Members

  1. val observable: SingleObservable[T]
  2. def toFuture(): Future[T]

    Collects the Observable results and converts to a scala.concurrent.Future.

    Collects the Observable results and converts to a scala.concurrent.Future.

    Automatically subscribes to the Observable and uses the Observable.head method to aggregate the results.

    returns

    a future representation of the whole Observable

    Note

    If the Observable is large then this will consume lots of memory! If the underlying Observable is infinite this Observable will never complete.

  3. def toFutureOption(): Future[Option[T]]

    Collects the Observable result and converts to a scala.concurrent.Future.

    Collects the Observable result and converts to a scala.concurrent.Future.

    returns

    a future representation of the Observable