Object/Class

net.liftweb.actor

LAFuture

Related Docs: class LAFuture | package actor

Permalink

object LAFuture

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. LAFuture
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait Context extends AnyRef

    Permalink

    Allows to wrap function in another function providing some additional functionality.

    Allows to wrap function in another function providing some additional functionality. It may choose to execute or not execute that functionality, but should not interpret or change the returned value; instead, it should perform orthogonal actions that need to occur around the given functionality. Typical example is setting up DB transaction.

    This is similar to net.liftweb.common.CommonLoanWrapper, however, it decorates the function eagerly. This way, you can access current thread's state which is essential to do things like set up a HTTP session wrapper

Value Members

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

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply[T](f: () ⇒ T, scheduler: LAScheduler = LAScheduler, context: Box[Context] = Empty): LAFuture[T]

    Permalink

    Create an LAFuture from a function that will be applied on a separate thread.

    Create an LAFuture from a function that will be applied on a separate thread. The LAFuture is returned immediately and the value may be obtained by calling get

    T

    the type

    f

    the function that computes the value of the future

    returns

    an LAFuture that will yield its value when the value has been computed

  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def build[T](f: ⇒ T, scheduler: LAScheduler = LAScheduler, context: Box[Context] = Empty): LAFuture[T]

    Permalink

    Build a new future with a call-by-name value that returns a type T

    Build a new future with a call-by-name value that returns a type T

    T

    the type that

    f

    the call-by-name code the defines the future

  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. def collect[T](future: LAFuture[T]*): LAFuture[List[T]]

    Permalink

    Collect all the future values into the aggregate future The returned future will be satisfied when all the collected futures are satisfied

  9. def collect[T, A](onFutureSucceeded: (T, LAFuture[A], ArrayBuffer[Box[T]], Int) ⇒ Unit, onFutureFailed: (Box[Nothing], LAFuture[A], ArrayBuffer[Box[T]], Int) ⇒ Unit, onAllFuturesCompleted: (LAFuture[A], ArrayBuffer[Box[T]]) ⇒ Unit, futures: LAFuture[T]*): LAFuture[A]

    Permalink

    Given handlers for a value's success and failure and a set of futures, runs the futures simultaneously and invokes either success or failure callbacks as each future completes.

    Given handlers for a value's success and failure and a set of futures, runs the futures simultaneously and invokes either success or failure callbacks as each future completes. When all futures are complete, if the handlers have not either satisfied or failed the overall result, onAllFuturesCompleted is called to complete it. If it *still* isn't complete, the overall result is failed with an error.

    Note that the success and failure functions are guaranteed to be run in a thread-safe manner. Each is passed the value, the result future, the accumulating ArrayBuffer, and the index of the future that has been completed. For the failure handler, the value is the Box of the failure.

  10. def collectAll[T](future: LAFuture[Box[T]]*): LAFuture[Box[List[T]]]

    Permalink

    Collect all the future values into the aggregate future The returned future will be satisfied when all the collected futures are satisfied or if any of the futures is Empty, then immediately satisfy the returned future with an Empty

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

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

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]

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

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

    Permalink
    Definition Classes
    Any
  17. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  18. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. def observeCreation[T](observation: (LAFuture[_]) ⇒ Unit)(toDo: ⇒ T): T

    Permalink

    Do something when a future is created on this thread.

    Do something when a future is created on this thread. This can be used to see if there's any Future activity on a thread and if there is, we can do smart things on an observing thread.

    T

    the type of the value returned by toDo

    observation

    the function to execute on Future creation

    toDo

    the action call-by-name code to execute whi

    returns

    the value computed by toDo

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

    Permalink
    Definition Classes
    AnyRef
  22. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped