Class

com.criteo.cuttle

Execution

Related Doc: package cuttle

Permalink

case class Execution[S <: Scheduling](id: String, job: Job[S], context: S.Context, streams: ExecutionStreams, platforms: Seq[ExecutionPlatform], projectName: String, projectVersion: String)(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.

Linear Supertypes
Serializable, Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Execution
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Execution(id: String, job: Job[S], context: S.Context, streams: ExecutionStreams, platforms: Seq[ExecutionPlatform], projectName: String, projectVersion: String)(implicit executionContext: SideEffectThreadPool)

    Permalink

    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

  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. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def cancel()(implicit user: User): Boolean

    Permalink

    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).

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val context: S.Context

    Permalink

    The SchedulingContext for which this execution has been created.

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

    Permalink
    Definition Classes
    AnyRef
  9. implicit val executionContext: SideEffectThreadPool

    Permalink

    The scoped scala.concurrent.ExecutionContext for this execution.

  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def forceSuccess()(implicit user: User): Unit

    Permalink
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. val id: String

    Permalink

    The unique id for this execution.

    The unique id for this execution. Guaranteed to be unique.

  14. def isCancelled: Boolean

    Permalink

    Returns true if this Execution has been cancelled.

  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val job: Job[S]

    Permalink

    The Job for which this execution has been created.

  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 onCancel(thunk: () ⇒ Unit): CancellationListener

    Permalink

    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.

  21. def park(duration: FiniteDuration): Future[Unit]

    Permalink

    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.

  22. val platforms: Seq[ExecutionPlatform]

    Permalink

    The available ExecutionPlatforms for this execution.

  23. val projectName: String

    Permalink
  24. val projectVersion: String

    Permalink
  25. def run(): Future[Completed]

    Permalink

    Run this execution on its job.

  26. val streams: ExecutionStreams

    Permalink

    The execution streams are scoped stdout, stderr for the execution.

  27. def synchronize[A, B](lock: A)(thunk: ⇒ Future[B]): Future[B]

    Permalink

    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.

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

    Permalink
    Definition Classes
    AnyRef
  29. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. def withMaxParallelRuns[A, B](lock: A, concurrencyLimit: Int)(thunk: ⇒ Future[B]): Future[B]

    Permalink

    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 most concurrencyLimit code blocks will run at once. Think about it as an asynchronous Semaphore helper.

    While waiting for the lock, the Execution will be seen as WAITING in the UI and the API.

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped