com.twitter.storehaus

FutureOps

object FutureOps extends AnyRef

Some combinators on Futures or Seqs of Futures that are used internally These should arguably exist in util-core.

Source
FutureOps.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Hide All
  2. Show all
  1. FutureOps
  2. AnyRef
  3. Any
Visibility
  1. Public
  2. All

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[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  8. def combineFOFn[A, B, C](f1: (A) ⇒ Future[Option[B]], f2: (B) ⇒ Future[Option[C]])(a: A): Future[Option[C]]

    Kleisli operator for Future[Option[_]] Monad.

    Kleisli operator for Future[Option[_]] Monad. I knew it would come to this.

  9. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  11. def finalize(): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  12. def find[T](futures: Stream[Future[T]])(pred: (T) ⇒ Boolean): Future[T]

    Given a Future, a lazy reference to a sequence of remaining futures and a predicate on T, tries each future in order and returns the first Future to both succeed and pass the supplied predicate.

  13. def flatMapValue[V, V2](f: Future[Option[V]])(fn: (V) ⇒ Future[V2]): Future[Option[V2]]

    If the f has Future(None) return None, otherwise flatMap the value with the given function

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

    Definition Classes
    AnyRef → Any
  15. def hashCode(): Int

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

    Definition Classes
    Any
  17. def liftFutureValues[K, K1 <: K, V](ks: Set[K1], result: Future[Map[K, Future[V]]], missingfn: (K1) ⇒ Future[V]): Map[K1, Future[V]]

    Push the outer future on a result into all the values Useful for putting finagle memcache into the same API as storehaus.

  18. def liftValues[K, K1 <: K, V](ks: Set[K1], result: Future[Map[K, V]], missingfn: (K1) ⇒ Future[V]): Map[K1, Future[V]]

    remove the outer wrapping of a Future and push it onto the values.

  19. def mapCollect[K, V](m: Map[K, Future[V]])(implicit fc: FutureCollector[(K, V)]): Future[Map[K, V]]

    Use the given future collector to produce a single Future of Map from a Map with Future values

  20. def missingValueFor[K](k: K): Future[Nothing]

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

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

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

    Definition Classes
    AnyRef
  24. def selectFirstSuccessfulTrial[T](futures: Seq[Future[T]])(pred: (T) ⇒ Boolean): Future[T]

    Given a Seq of equivalent Futures, return the first non-exceptional that passes the supplied predicate.

    Given a Seq of equivalent Futures, return the first non-exceptional that passes the supplied predicate. If all futures fail to succeed or pass the predicate, the final future to complete will be returned.

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

    Definition Classes
    AnyRef
  26. def toString(): String

    Definition Classes
    AnyRef → Any
  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any