case class Execution[S <: Scheduling](id: String, job: Job[S], context: S.Context, streams: ExecutionStreams, platforms: Seq[ExecutionPlatform], projectName: String, projectVersion: String, previousFailures: List[ExecutionLog])(implicit executionContext: SideEffectThreadPool) extends Product with Serializable
Executions are created by the Scheduler.
- id
The unique id for this execution. Guaranteed to be unique.
- job
The Job for which this execution has been created.
- context
The SchedulingContext for which this execution has been created.
- streams
The execution streams are scoped stdout, stderr for the execution.
- platforms
The available ExecutionPlatforms for this execution.
- executionContext
The scoped
scala.concurrent.ExecutionContext
for this execution.
- Alphabetic
- By Inheritance
- Execution
- Serializable
- Serializable
- Product
- Equals
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
-
new
Execution(id: String, job: Job[S], context: S.Context, streams: ExecutionStreams, platforms: Seq[ExecutionPlatform], projectName: String, projectVersion: String, previousFailures: List[ExecutionLog])(implicit executionContext: SideEffectThreadPool)
- id
The unique id for this execution. Guaranteed to be unique.
- job
The Job for which this execution has been created.
- context
The SchedulingContext for which this execution has been created.
- streams
The execution streams are scoped stdout, stderr for the execution.
- platforms
The available ExecutionPlatforms for this execution.
- executionContext
The scoped
scala.concurrent.ExecutionContext
for this execution.
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
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
cancel()(implicit user: User): Boolean
Cancels this Execution.
Cancels this Execution. Note that cancelling an execution does not forcibly stop the SideEffect function if it has already started. It will just call the CancellationListener so the user code can gracefully shutdown if it handles cancellation properly. Note that the provided ExecutionPlatforms handle cancellation properly, so for SideEffect that use the provided platforms they support cancellation out of the box.
- user
The user who asked for the cancellation (either from the UI or the private API).
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
- val context: S.Context
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- implicit val executionContext: SideEffectThreadPool
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- val id: String
-
def
isCancelled: Boolean
Returns
true
if this Execution has been cancelled. -
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val job: Job[S]
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
onCancel(thunk: () ⇒ Unit): CancellationListener
Attach a CancellationListener that will be called id this Execution is cancelled.
Attach a CancellationListener that will be called id this Execution is cancelled.
- thunk
The callback function to be called.
-
def
park(duration: FiniteDuration): Future[Unit]
Park this execution for the provided duration.
Park this execution for the provided duration. After the duration the returned
Future
will complete allowing the SideEffect to resume.During this time, the Execution will be seen as WAITING in the UI and the API.
- val platforms: Seq[ExecutionPlatform]
- val previousFailures: List[ExecutionLog]
- val projectName: String
- val projectVersion: String
-
def
run(): Future[Completed]
Run this execution on its job.
- val streams: ExecutionStreams
-
def
synchronize[A, B](lock: A)(thunk: ⇒ Future[B]): Future[B]
Synchronize a code block over a lock.
Synchronize a code block over a lock. If several SideEffect functions need to race for a shared thread unsafe resource, they can use this helper function to ensure that only one code block will run at once. Think about it as an asynchronous
synchronized
helper.While waiting for the lock, the Execution will be seen as WAITING in the UI and the API.
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
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
- @native() @throws( ... )
-
def
withMaxParallelRuns[A, B](lock: A, concurrencyLimit: Int)(thunk: ⇒ Future[B]): Future[B]
Allows up to
concurrencyLimit
concurrent executions of a code block over a lock.Allows up to
concurrencyLimit
concurrent executions of a code block over a lock. If severalSideEffect functions need to race for a shared thread unsafe resource, they can use this helper function to ensure that at mostconcurrencyLimit
code blocks will run at once. Think about it as an asynchronousSemaphore
helper.While waiting for the lock, the Execution will be seen as WAITING in the UI and the API.