net.sf.asyncobjects.asyncscala

AsyncControl

object AsyncControl extends AnyRef

Asynchronous control structures

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

Type Members

  1. type Resolver [-T] = (Outcome[T]) ⇒ Unit

    The resolver type

Value Members

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

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

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

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

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

    Attributes
    final
    Definition Classes
    Any
  6. def aAll [T1, T2, T3, T4] (b1: ⇒ Promise[T1], b2: ⇒ Promise[T2], b3: ⇒ Promise[T3], b4: ⇒ Promise[T4]): Promise[(T1, T2, T3, T4)]

    Expression variant of "all" operator

    Expression variant of "all" operator

    b1

    the asynchronous expression to be evaluated

    b2

    the asynchronous expression to be evaluated

    b3

    the asynchronous expression to be evaluated

    b4

    the asynchronous expression to be evaluated

    returns

    a promise for tuple value

  7. def aAll [T1, T2, T3] (b1: ⇒ Promise[T1], b2: ⇒ Promise[T2], b3: ⇒ Promise[T3]): Promise[(T1, T2, T3)]

    Expression variant of "all" operator

    Expression variant of "all" operator

    b1

    the asynchronous expression to be evaluated

    b2

    the asynchronous expression to be evaluated

    b3

    the asynchronous expression to be evaluated

    returns

    a promise for tuple value

  8. def aAll [T1, T2] (b1: ⇒ Promise[T1], b2: ⇒ Promise[T2]): Promise[(T1, T2)]

    Expression variant of "all" operator

    Expression variant of "all" operator

    b1

    the asynchronous expression to be evaluated

    b2

    the asynchronous expression to be evaluated

    returns

    a promise for tuple value

  9. def aAll [T1] (body: ⇒ Promise[T1]): AllTupleBuilder[T1]

    Start building All construct

    Start building All construct

    body

    the body of the first branch

  10. def aAllFor [I, T] (collection: Iterable[I])(body: (I) ⇒ Promise[T]): AllForEnumeratorBuilder[I, T]

    Start allFor creation

    Start allFor creation

    collection

    the collection of items

    body

    the body that translates individual items

    returns

    the builder that allows specifying a folding rule

  11. def aAllForList [I, T] (collection: Iterable[I])(body: (I) ⇒ Promise[T]): Promise[List[T]]

    Construct list for each element of collection in iteration order

    Construct list for each element of collection in iteration order

    collection

    the collection of items

    body

    the body that translates individual items

    returns

    the promise for list with all items

  12. def aAllForUnit [I, T] (collection: Iterable[I])(body: (I) ⇒ Promise[T]): Promise[Unit]

    Construct a unit value when all activities finish.

    Construct a unit value when all activities finish. This is the simplest variant of all construct

    collection

    the collection of items

    body

    the body that translates individual items

    returns

    the promise for unit that resolves when all activities finish

  13. def aAny [T] (b1: ⇒ Promise[T]): AnyBuilder[T]

    Start building any construct

    Start building any construct

    b1

    the first body

    returns

    any construct builder

  14. def aFailure [T] (problem: Throwable): Promise[T]

    Create a already resolved promise with a failure outcome

    Create a already resolved promise with a failure outcome

    problem

    the problem for the failure

    returns

    the resolved promise

  15. def aLater [T] (vat: Vat)(f: ⇒ Promise[T]): Promise[T]

    Execute body later in the specified vat

    Execute body later in the specified vat

    vat

    the destination vat

    returns

    the promise for execution results

  16. def aLater [T] (f: ⇒ Promise[T]): Promise[T]

    Execute body later in the current vat

    Execute body later in the current vat

    returns

    the promise for execution results

  17. def aLaterWrap [T] (vat: Vat)(f: ⇒ T): Promise[T]

    Execute body later in the specified vat

    Execute body later in the specified vat

    vat

    the destination vat

    returns

    the promise for execution results

  18. def aLaterWrap [T] (body: ⇒ T): Promise[T]

    Execute body later in the current vat

    Execute body later in the current vat

    body

    the body to execute

    returns

    the promise for execution results

  19. def aNever [T] : Promise[T]

    returns

    a promise that will never resolve

  20. def aNow [T] (body: ⇒ Promise[T]): Promise[T]

    Execute action in the current turn, and if there is a exception thrown, wrap into promise.

    Execute action in the current turn, and if there is a exception thrown, wrap into promise. Also null result is considered as NullPointerException. The operation ensures that returned promise is valid, and there is no unexpected exceptions.

    body

    the body of the action

    returns

    the promise for body execution result

  21. def aNowR [T] (body: Function1[(net.sf.asyncobjects.asyncscala.Outcome[T]) => Unit, _]): Promise[T]

    Execute body with resolver of returned promise ignoring result with except for thrown exception.

    Execute body with resolver of returned promise ignoring result with except for thrown exception. The promise is supposed to be eventually resolved using the supplied resolver.

    returns

    a promise that is resolved by body through resolver

  22. def aNowWrap [T] (body: ⇒ T): Promise[T]

    Wrap result of function execution into promise

    Wrap result of function execution into promise

    body

    the body to execute

    returns

    the resolved promise that contain execution result

  23. def aPar [T1] (spawner: ASpawner)(body: ⇒ Promise[T1]): AllTupleBuilder[T1]

    Start building Par construct

    Start building Par construct

    body

    the body of the first branch

  24. def aParFor [I, T] (spawner: ASpawner, collection: Iterable[I])(body: (I) ⇒ Promise[T]): AllForEnumeratorBuilder[I, T]

    Start ParFor creation

    Start ParFor creation

    collection

    the collection of items

    body

    the body that translates individual items

    returns

    the builder that allows specifying a folding rule

  25. def aParForList [I, T] (spawner: ASpawner, collection: Iterable[I])(body: (I) ⇒ Promise[T]): Promise[List[T]]

    Construct list for each element of collection in iteration order, each item is iterated in new vat

    Construct list for each element of collection in iteration order, each item is iterated in new vat

    collection

    the collection of items

    body

    the body that translates individual items

    returns

    the promise for list with all items

  26. def aParForUnit [I, T] (spawner: ASpawner, collection: Iterable[I])(body: (I) ⇒ Promise[T]): Promise[Unit]

    Construct a unit value when all activities finish in the vats.

    Construct a unit value when all activities finish in the vats. This is the simplest variant of all construct

    collection

    the collection of items

    body

    the body that translates individual items

    returns

    the promise for unit that resolves when all activities finish

  27. def aResolver [T] (body: Resolver[T]): Resolver[T]

    Create an exported resolver instance

    Create an exported resolver instance

    body

    the resolver body

    returns

    an exported instance of the resolver

  28. def aSend (action: ⇒ Unit): Unit

    Send an action to execute to the specified vat

    Send an action to execute to the specified vat

    action

    the action to execute

  29. def aSend (vat: Vat)(action: ⇒ Unit): Unit

    Send an action to execute to the specified vat

    Send an action to execute to the specified vat

    vat

    the destination vat

    action

    the action to execute

  30. def aSeq [A, B] (body1: ⇒ Promise[A], body2: (A) ⇒ Promise[B]): Promise[B]

    The two argument seq that just orders two calls.

    The two argument seq that just orders two calls. It does not work as expected SI-4657

    body1

    the first body

    body2

    the second body

    returns

    the promise that resolves when second body resolves after the first (the result of the first is passed to second)

  31. def aSeq [R] (body: ⇒ Promise[R]): WhenBuilder[Unit, R]

    Start building seq operation

    Start building seq operation

    body

    the body of operation

    returns

    a constructor for when operation

  32. def aSeq3 [A, B, C] (body1: ⇒ Promise[A])(body2: (A) ⇒ Promise[B])(body3: (B) ⇒ Promise[C]): Promise[C]

    The two argument seq that just orders two calls.

    The two argument seq that just orders two calls. It does not work as expected SI-4657

    body1

    the first body

    body2

    the second body

    returns

    the promise that resolves when second body resolves after the first (the result of the first is passed to second)

  33. def aSeqE [A, B] (body1: ⇒ Promise[A])(body2: (A) ⇒ Promise[B]): Promise[B]

    The two argument seq that just orders two calls.

    The two argument seq that just orders two calls. It practically identical to aWhenLast(p1)(body2(_)), except that it might execute body2 on the same turn, if result is already available.

    body1

    the first body

    body2

    the second body

    returns

    the promise that resolves when second body resolves after the first (the result of the first is passed to second)

  34. def aSeqFor [I, R] (collection: Iterable[I])(body: (I) ⇒ Promise[R]): SeqLoopBuilder[I, R]

    A loop over collections that returns a unit as result of iteration

    A loop over collections that returns a unit as result of iteration

    collection

    the collection to iterate

    body

    the body of iteration

  35. def aSeqFor [I, R] (collection: Iterable[I])(body: (I) ⇒ Promise[R]): SeqLoopBuilder[I, R]

    A loop over collections that returns a unit as result of iteration

    A loop over collections that returns a unit as result of iteration

    collection

    the collection to iterate

    body

    the body of iteration

  36. def aSeqForFold [I, O] (collection: Iterable[I], init: O)(f: (O, I) ⇒ Promise[O]): Promise[O]

    A loop over collections that returns a unit as result of iteration

    A loop over collections that returns a unit as result of iteration

    collection

    the collection to iterate

  37. def aSeqForUnit [I, X] (collection: Iterable[I])(body: (I) ⇒ Promise[X]): Promise[Unit]

    A loop over collections that returns a unit as result of iteration

    A loop over collections that returns a unit as result of iteration

    collection

    the collection to iterate

    body

    the body of iteration

  38. def aSeqI [A, B, C] (body1: ⇒ Promise[A], body2: ⇒ Promise[B], body3: ⇒ Promise[C]): Promise[C]

    The two argument seq that just orders calls (the both arguments could be invoked on the same turn)

    The two argument seq that just orders calls (the both arguments could be invoked on the same turn)

    body1

    the first body

    body2

    the second body

    returns

    the promise that resolves when second body resolves after the first

  39. def aSeqI [A, B] (body1: ⇒ Promise[A], body2: ⇒ Promise[B]): Promise[B]

    The two argument seq that just orders calls (the both arguments could be invoked on the same turn)

    The two argument seq that just orders calls (the both arguments could be invoked on the same turn)

    body1

    the first body

    body2

    the second body

    returns

    the promise that resolves when second body resolves after the first

  40. def aSeqLoop (body: ⇒ Promise[Boolean]): Promise[Unit]

    A simple loop that repeats body until body's promise resolves to false.

    A simple loop that repeats body until body's promise resolves to false. The iteration starts on this turn, the next iterations are done on separate turns.

    body

    the body to repeat

    returns

    the promise that resolves after last iteration

  41. def aSeqWhile [R] (condition: ⇒ Promise[Boolean])(body: ⇒ Promise[R]): SeqLoopBuilder[Unit, R]

  42. def aSeqWhileUnit [R] (condition: ⇒ Promise[Boolean])(body: ⇒ Promise[R]): Promise[Unit]

    A sequence while construct that return unit

    A sequence while construct that return unit

    condition

    the condition

    body

    the body of the loop

    returns

    the promise that resolves when looping finishes

  43. def aSuccess [T] (value: T): Promise[T]

    Create a already resolved promise with a successful outcome

    Create a already resolved promise with a successful outcome

    value

    the value that will be and outcome of the operation

    returns

    the resolved promise

  44. def aUnit : Promise[Unit]

    Return a unit promise

  45. def aWhen [I, R] (input: ⇒ Promise[I])(body: (I) ⇒ Promise[R]): WhenBuilder[I, R]

    Start building when operation

    Start building when operation

    input

    the input promise

    body

    the body of operation

  46. def aWhenI [I, R] (input: ⇒ Promise[I])(body: ⇒ Promise[R]): WhenBuilder[I, R]

    Start building when operation (ignore result value of input promise)

    Start building when operation (ignore result value of input promise)

    input

    the input promise

    body

    the body of operation

  47. def aWhenLast [I, R] (input: ⇒ Promise[I])(body: (I) ⇒ Promise[R]): Promise[R]

    Start and finish building when operation (used when When#failed and When#finallyDo are not needed.

    Start and finish building when operation (used when When#failed and When#finallyDo are not needed.

    input

    the input promise

    body

    the body of operation

  48. def aWhenLastI [I, R] (input: ⇒ Promise[I])(body: ⇒ Promise[R]): Promise[R]

    Start building when operation (ignore result value of input promise)

    Start building when operation (ignore result value of input promise)

    input

    the input promise

    body

    the body of operation

  49. def asInstanceOf [T0] : T0

    Attributes
    final
    Definition Classes
    Any
  50. def clone (): AnyRef

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  51. def doAsync [T] (body: ⇒ Promise[T]): T

    Start asynchronous context in the current thread.

    Start asynchronous context in the current thread. The method starts a vats.SingleThreadRunner in the current tread, and exits with the body's outcome when promise returned from body is resolved.

    body

    the body to execute

    returns

    a value from body

  52. def eq (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  53. def equals (arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  54. def failure [A] (resolver: Resolver[A], problem: Throwable): Unit

    Notify resolver with the specified failure

    Notify resolver with the specified failure

    resolver

    the resolver to notify

    problem

    the problem to notify with

  55. def finalize (): Unit

    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws()
  56. def getClass (): java.lang.Class[_]

    Attributes
    final
    Definition Classes
    AnyRef
  57. def hashCode (): Int

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

    Attributes
    final
    Definition Classes
    Any
  59. def ne (arg0: AnyRef): Boolean

    Attributes
    final
    Definition Classes
    AnyRef
  60. def notify (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  61. def notifyAll (): Unit

    Attributes
    final
    Definition Classes
    AnyRef
  62. val nullResolver : Resolver[Any]

    The resolver that just does nothing

  63. def resolve [T] (resolver: Resolver[T], outcome: Outcome[T]): Unit

    Notify resolver with the specified outcome.

    Notify resolver with the specified outcome. The exceptions are logged

    resolver

    the resolver to notify

    outcome

    the operation outcome

  64. def success [T] (resolver: Resolver[T], value: T): Unit

    Notify resolver with the specified value

    Notify resolver with the specified value

    resolver

    the resolver to notify

    value

    a value of operation

  65. def synchronized [T0] (arg0: ⇒ T0): T0

    Attributes
    final
    Definition Classes
    AnyRef
  66. def toString (): String

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

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

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

    Attributes
    final
    Definition Classes
    AnyRef
    Annotations
    @throws()

Inherited from AnyRef

Inherited from Any