com.qifun.statelessFuture.Awaitable

Stateful

trait Stateful[+AwaitResult, TailRecResult] extends Awaitable[AwaitResult, TailRecResult]

An stateful Awaitable that represents an asynchronous operation already started.

Linear Supertypes
Awaitable[AwaitResult, TailRecResult], Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Stateful
  2. Awaitable
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def getClass(): Class[_]

    Definition Classes
    Any
  2. abstract def onComplete(handler: (AwaitResult) ⇒ TailRec[TailRecResult])(implicit catcher: Catcher[TailRec[TailRecResult]]): TailRec[TailRecResult]

    Like foreach, except this method supports tail-call optimization.

    Like foreach, except this method supports tail-call optimization.

    Definition Classes
    Awaitable
  3. abstract def value: Option[Try[AwaitResult]]

    The result of the asynchronous operation.

Concrete Value Members

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

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

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

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

    Definition Classes
    Any
  5. final def await: AwaitResult

    Suspends this Awaitable until the asynchronous operation being completed, and then returns the result of the asynchronous operation.

    Suspends this Awaitable until the asynchronous operation being completed, and then returns the result of the asynchronous operation.

    Definition Classes
    Awaitable
    Annotations
    @compileTimeOnly( ... )
    Note

    This method must be in a Future.apply block or Awaitable.apply block.

    ,

    The code after await and the code before await may be evaluated in different threads.

  6. def equals(arg0: Any): Boolean

    Definition Classes
    Any
  7. final def flatMap[ConvertedAwaitResult](converter: (AwaitResult) ⇒ Awaitable[ConvertedAwaitResult, TailRecResult]): Stateless[ConvertedAwaitResult, TailRecResult]

    Returns a new Awaitable.Stateless composed of this Awaitable and the converter.

    Returns a new Awaitable.Stateless composed of this Awaitable and the converter. The new Awaitable.Stateless will pass the original result to convert when the original asynchronous operation being completed, or pass the exception to catcher when the original asynchronous operation being failed.

    Definition Classes
    Awaitable
  8. final def foreach(handler: (AwaitResult) ⇒ TailRecResult)(implicit catcher: Catcher[TailRecResult]): TailRecResult

    Asks this Awaitable to pass result to handler when the asynchronous operation being completed, or to pass the exception to catcher when the asynchronous operation being failed, and starts the asynchronous operation if this Awaitable is an Awaitable.Stateless.

    Asks this Awaitable to pass result to handler when the asynchronous operation being completed, or to pass the exception to catcher when the asynchronous operation being failed, and starts the asynchronous operation if this Awaitable is an Awaitable.Stateless.

    Definition Classes
    Awaitable
  9. def hashCode(): Int

    Definition Classes
    Any
  10. def isCompleted: Boolean

    Tests if this Awaitable.Stateful is completed.

  11. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  12. final def map[ConvertedAwaitResult](converter: (AwaitResult) ⇒ ConvertedAwaitResult): Stateless[ConvertedAwaitResult, TailRecResult]

    Returns a new Awaitable.Stateless composed of this Awaitable and the converter.

    Returns a new Awaitable.Stateless composed of this Awaitable and the converter. The new Awaitable.Stateless will pass the original result to convert when the original asynchronous operation being completed, or pass the exception to catcher when the original asynchronous operation being failed.

    Definition Classes
    Awaitable
  13. def toString(): String

    Definition Classes
    Any
  14. final def withFilter(condition: (AwaitResult) ⇒ Boolean): Stateless[AwaitResult, TailRecResult]

    Returns a new Awaitable.Stateless composed of this Awaitable and the condition.

    Returns a new Awaitable.Stateless composed of this Awaitable and the condition. The new Awaitable.Stateless will pass the original result to condition when the original asynchronous operation being completed, or pass the exception to catcher when the original asynchronous operation being failed.

    Definition Classes
    Awaitable
    Exceptions thrown
    java.util.NoSuchElementException

    Passes to catcher if the condition returns false.

Inherited from Awaitable[AwaitResult, TailRecResult]

Inherited from Any

Ungrouped