dispatch

Promise

trait Promise[+A] extends PromiseSIP[A]

Self Type
Promise[A]
Linear Supertypes
PromiseSIP[A], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Promise
  2. PromiseSIP
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. trait SelfPromise[+B] extends DelegatePromise[A] with Promise[B]

    Nested promise that delegates listening directly to this self

Abstract Value Members

  1. abstract def addListener(f: () ⇒ Unit): Unit

    Listener to be called in an executor when promise is available

    Listener to be called in an executor when promise is available

    Attributes
    protected[dispatch]
  2. abstract def claim: A

    Claim promise or throw exception, should only be called once

    Claim promise or throw exception, should only be called once

    Attributes
    protected
  3. abstract def isComplete: Boolean

    True if promised value is available

  4. abstract def timeout: Duration

Concrete 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. def apply(): A

    Blocks until promised value is available, returns promised value or throws ExecutionException.

  7. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  9. def completeOption: Option[A]

    Some value if promise is complete, otherwise None

  10. def either: Promise[Either[Throwable, A]] with SelfPromise[Either[Throwable, A]] { def claim: Product with Serializable with scala.util.Either[Throwable,A] }

    Project promised value into an either containing the value or any exception thrown retrieving it.

    Project promised value into an either containing the value or any exception thrown retrieving it. Unwraps cause of any top-level ExecutionException

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

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

    Definition Classes
    AnyRef → Any
  13. def failed: Promise[Throwable]

    Definition Classes
    PromiseSIP
  14. def filter(p: (A) ⇒ Boolean): Promise[A]

    filter still used for certain cases in for expressions

  15. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  16. def flatMap[B, C, That <: Promise[C]](f: (A) ⇒ B)(implicit guarantor: Guarantor[B, C, That]): Promise[C]

    Bind this Promise to another Promise, or something which an implicit Guarantor may convert to a Promise.

  17. def fold[X](fa: (Throwable) ⇒ X, fb: (A) ⇒ X): Promise[X]

    Project any resulting exception or result into a unified type X

  18. def foreach[U](f: (A) ⇒ U): Unit

    Cause some side effect with the promised value, if it is produced with no exception

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

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

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

    Definition Classes
    Any
  22. def left[B, C](implicit ev: <:<[Promise[A], Promise[Either[B, C]]]): LeftProjection[B, C]

    Create a left projection of a contained either

  23. def map[B](f: (A) ⇒ B): Promise[B]

    Map the promised value to something else

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

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

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

    Definition Classes
    AnyRef
  27. def onComplete[U](f: (Either[Throwable, A]) ⇒ U): Promise[A]

    Definition Classes
    PromiseSIP
  28. def onFailure[U](f: PartialFunction[Throwable, U]): Promise[A]

    Definition Classes
    PromiseSIP
  29. def onSuccess[U](f: PartialFunction[A, U]): Promise[A]

    Definition Classes
    PromiseSIP
  30. def option: Promise[Option[A]]

    Project promised value into an Option containing the value if retrived with no exception

  31. def recover[B >: A](f: PartialFunction[Throwable, B]): Promise[B]

    Definition Classes
    PromiseSIP
  32. lazy val result: Either[Throwable, A]

    Internal cache of promised value or exception thrown

    Internal cache of promised value or exception thrown

    Attributes
    protected
  33. def right[B, C](implicit ev: <:<[Promise[A], Promise[Either[B, C]]]): RightProjection[B, C]

    Create a right projection of a contained either

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

    Definition Classes
    AnyRef
  35. def toString(): String

    Definition Classes
    Promise → AnyRef → Any
  36. def values[B](implicit ev: <:<[Promise[A], Promise[Iterable[B]]]): Values[B]

    Facilitates projection over promised iterables

  37. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws()
  40. def withFilter(p: (A) ⇒ Boolean): Promise[A]

    Support if clauses in for expressions.

    Support if clauses in for expressions. A filtered promise behaves like an Option, in that apply() will throw a NoSuchElementException when the promise is empty.

Inherited from PromiseSIP[A]

Inherited from AnyRef

Inherited from Any

No Group