object LAFuture
- Alphabetic
- By Inheritance
- LAFuture
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
trait
Context
extends AnyRef
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
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
apply[T](f: () ⇒ T, scheduler: LAScheduler = LAScheduler, context: Box[Context] = Empty): LAFuture[T]
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
build[T](f: ⇒ T, scheduler: LAScheduler = LAScheduler, context: Box[Context] = Empty): LAFuture[T]
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
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
def
collect[T](future: LAFuture[T]*): LAFuture[List[T]]
Collect all the future values into the aggregate future The returned future will be satisfied when all the collected futures are satisfied
-
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]
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 theBox
of the failure. -
def
collectAll[T](future: LAFuture[Box[T]]*): LAFuture[Box[List[T]]]
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
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
-
def
observeCreation[T](observation: (LAFuture[_]) ⇒ Unit)(toDo: ⇒ T): T
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
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )