Execution

case class Execution(run: Option[Env => Future[() => Result]], executing: Executing, timeout: Option[FiniteDuration], mustJoin: Boolean, nextMustStopIf: Result => Boolean, previousResult: Option[Result], finalResultMap: Option[Result => Result], continuation: Option[FragmentsContinuation])

Execution of a Fragment

  • there can be none (for a piece of text)
  • the execution depends on the current Env. by default executions are created synchronously but can also be fork-off with Execution.withEnvAsync
  • it can have its own timeout (default is infinite)
  • once executed the result is kept
  • if mustJoin is true this means that all previous executions must be finished before this one can start
  • it has a condition deciding if the next execution can proceed or not depending on the current result
  • the result of a similar execution can be stored to decide if this one needs to be executed or not
  • it can store a continuation that will create more fragments, possibly containing more executions, based on the current result
Companion
object
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any

Value members

Concrete methods

def after(executions: List[Execution]): Execution

run this execution after the previous executions are finished

run this execution after the previous executions are finished

def afterSequential(executions: List[Execution]): Execution

run this execution after the other executions have been sequentially executed

run this execution after the other executions have been sequentially executed

def afterSuccessful(executions: List[Execution]): Execution

run this execution after the executions and only if they are successful

run this execution after the executions and only if they are successful

run this execution after the other executions have been sequentially executed and only if they are successful

run this execution after the other executions have been sequentially executed and only if they are successful

override def equals(a: Any): Boolean
Definition Classes
Equals -> Any
override def hashCode: Int
Definition Classes
Any
def isExecutable: Boolean
Returns

true if something can be run

methods to set the execution

methods to set the execution

def mapFinalResult(f: Result => Result): Execution

modify the final result - the passed function cannot throw an exception!

modify the final result - the passed function cannot throw an exception!

def mapResult(f: Result => Result): Execution

map a result - the passed function can potentially throw an exception

map a result - the passed function can potentially throw an exception

def setExecuting(r: Future[(Result, SimpleTimer)]): Execution
Returns

set an execution result being computed

def setFatal(f: Throwable): Execution
Returns

set a fatal execution error

def setPreviousResult(r: Option[Result]): Execution
def setResult(r: => Result): Execution
Returns

set an execution result

def setTimeout(timeout: FiniteDuration): Execution
def startAfter(other: Execution)(env: Env): Execution

start this execution when the other one is finished

start this execution when the other one is finished

def startAfter(others: List[Execution])(env: Env): Execution

start this execution when the other ones are finished

start this execution when the other ones are finished

run the execution

run the execution

def stopNextIf(r: Result): Execution
def stopNextIf(f: Result => Boolean): Execution
override def toString: String
Definition Classes
Any
def updateMessage(f: String => String): Execution

force a message

force a message

def updateResult(newResult: (=> Result) => Result): Execution
def updateRun(newRun: Env => Future[() => Result] => Env => Future[() => Result]): Execution
def was(statusCheck: String => Boolean): Boolean

Inherited methods

def productElementNames: Iterator[String]
Inherited from
Product
def productIterator: Iterator[Any]
Inherited from
Product

Concrete fields

lazy val executedResult: Action[ExecutedResult]
lazy val executionResult: Action[Result]