FutureBase

io.ino.solrs.future.FutureBase
abstract class FutureBase[+T] extends Future[T]

Attributes

Graph
Supertypes
trait Future[T]
class Object
trait Matchable
class Any
Known subtypes
class JavaFuture[T]
class ScalaFuture[T]
class TwitterFuture[T]

Members list

Value members

Concrete methods

protected def flatMapSuccess[A, B](p: Promise[B], f: A => Future[B], value: A): Unit
protected def handleFailure[U >: T](p: Promise[U], pf: PartialFunction[Throwable, U], t: Throwable): Unit
protected def handleWithFailure[U >: T](p: Promise[U], pf: PartialFunction[Throwable, Future[U]], t: Throwable): Any
protected def mapSuccess[A, B](promise: Promise[B], f: A => B, value: A): Unit

Inherited methods

def flatMap[S](f: T => Future[S]): Future[S]

Attributes

Inherited from:
Future
def handle[U >: T](pf: PartialFunction[Throwable, U]): Future[U]

Attributes

Inherited from:
Future
def handleWith[U >: T](pf: PartialFunction[Throwable, Future[U]]): Future[U]

Creates a new future that will handle any matching throwable that this future might contain by assigning it a value of another future.

Creates a new future that will handle any matching throwable that this future might contain by assigning it a value of another future.

If there is no match, or if this future contains a valid result then the new future will contain the same result.

Example:

val f = future { Int.MaxValue }
future (6 / 0) handle { case e: ArithmeticException => f } // result: Int.MaxValue

Like recoverWith from std lib, related to rescue/handle in twitter.

Attributes

Inherited from:
Future
def map[S](f: T => S): Future[S]

Attributes

Inherited from:
Future
def onComplete[U](func: Try[T] => U): Unit

Attributes

Inherited from:
Future