com.qifun.statelessFuture

Awaitable

sealed trait Awaitable[+AwaitResult, TailRecResult] extends Any

Something that will be completed in the future.

AwaitResult

The type that await returns.

TailRecResult

The response type, should be Unit in most cases.

Self Type
Awaitable[AwaitResult, TailRecResult]
See also

Future

Linear Supertypes
Any
Known Subclasses
Type Hierarchy Learn more about scaladoc diagrams
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Awaitable
  2. 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.

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.

    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.

  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.

  9. def hashCode(): Int

    Definition Classes
    Any
  10. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  11. 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.

  12. def toString(): String

    Definition Classes
    Any
  13. 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.

    Exceptions thrown
    java.util.NoSuchElementException

    Passes to catcher if the condition returns false.

Inherited from Any

Ungrouped