com.gilt.gfc.guava.future

RichListenableFuture

case class RichListenableFuture[T](future: ListenableFuture[T]) extends Product with Serializable

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. RichListenableFuture
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new RichListenableFuture(future: ListenableFuture[T])

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def filter(q: (T) ⇒ Boolean): ListenableFuture[T]

  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def flatMap[A](f: (T) ⇒ ListenableFuture[A]): ListenableFuture[A]

  12. def foreach[U](f: (T) ⇒ Unit): Unit

  13. val future: ListenableFuture[T]

  14. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  15. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  16. def map[A](f: (T) ⇒ A): ListenableFuture[A]

  17. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  20. def recover[U >: T](pf: PartialFunction[Throwable, U])(implicit executor: ExecutorService = MoreExecutors.sameThreadExecutor()): ListenableFuture[U]

    Creates a new future that will handle any matching throwable that this future might contain.

    Creates a new future that will handle any matching throwable that this future might contain. If there is no match, or if this future contains a valid result then the new future will contain the same.

  21. def recoverWith[U >: T](pf: PartialFunction[Throwable, ListenableFuture[U]])(implicit executor: ExecutorService = MoreExecutors.sameThreadExecutor()): ListenableFuture[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.

  22. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  23. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  25. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. def withDefault(fallbackValue: T, errorCallback: (Throwable) ⇒ Unit = ex: Throwable => error(ex)): ListenableFuture[T]

    Helper method to guard against RPC failures and the like.

    Helper method to guard against RPC failures and the like. Variation of withEitherFallback method where a default value is returned in cases where there an exception is thrown.

    If no errorCallback is specified the exception is logged as an error.

  27. def withEitherFallback: ListenableFuture[Either[Throwable, T]]

    Helper method to guard against RPC failures and the like, converts a 'regular' Future to a Future of Either with Left[Throwable] representing cases where an exception was caught and Right[T] representing desired results.

  28. def withFilter(q: (T) ⇒ Boolean): ListenableFuture[T]

  29. def withOptionFallback(errorCallback: (Throwable) ⇒ Unit = ex: Throwable => error(ex)): ListenableFuture[Option[T]]

    Helper method to guard against RPC failures and the like, converts a 'regular' Future to a Future of Option.

    Helper method to guard against RPC failures and the like, converts a 'regular' Future to a Future of Option. Variation of withEitherFallback method where None represents an error (exception was thrown) case and Some[T] represents an Ok case.

    Optional errorCallback parameter allows caller to inject e.g. custom error logging, like

    class Foo extends Loggable {
    f.withOptionFallback(error(_))
    }

    If no errorCallback is specified the exception is logged as an error.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped