Packages

c

com.criteo.cuttle

Execution

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

Source
Executor.scala
Linear Supertypes
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], projectVersion: String)(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

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. 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).

  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val context: S.Context
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. implicit val executionContext: SideEffectThreadPool
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def forceSuccess()(implicit user: User): Unit
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
  13. val id: String
  14. def isCancelled: Boolean

    Returns true if this Execution has been cancelled.

  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. val job: Job[S]
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
  20. 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.

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

  22. val platforms: Seq[ExecutionPlatform]
  23. val projectVersion: String
  24. def run(): Future[Completed]

    Run this execution on its job.

  25. val streams: ExecutionStreams
  26. 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.

  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  30. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. 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 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