Class/Object

pt.tecnico.dsi.akkastrator

Task

Related Docs: object Task | package akkastrator

Permalink

abstract class Task extends AnyRef

A task corresponds to sending a message to an actor, handling its response and possibly mutate the internal state of the Orchestrator. The answer(s) to the sent message must be handled in behavior. behavior must invoke finish when no further processing is necessary. The pattern matching inside behavior should invoke matchSenderAndID to ensure the received message is in fact the one that we were waiting to receive. The internal state of the orchestrator might be mutated inside behavior.

This class is very tightly coupled with Orchestrator and the reverse is also true. Because of this you can only create instances of Task inside an orchestrator.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Task
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Task(description: String, dependencies: Set[Task] = Set.empty[Task])(implicit orchestrator: Orchestrator)

    Permalink

Abstract Value Members

  1. abstract def behavior: Receive

    Permalink

    The behavior of this task.

    The behavior of this task. This is akin to the receive method of an actor, except for the fact that an all catching pattern match will cause the orchestrator to fail. For example:

    def behavior = Receive {
      case m => //Some code
    }

    Will cause the orchestrator to fail.

  2. abstract def createMessage(correlationId: CorrelationId): Any

    Permalink

    The constructor of the message to be sent.

  3. abstract val destination: ActorPath

    Permalink

    The ActorPath to whom this task will send the message(s).

Concrete 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. final def canStart: Boolean

    Permalink

    returns

    whether this task status is Unstarted and all its dependencies have finished.

  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val dependencies: Set[Task]

    Permalink
  8. val description: String

    Permalink
  9. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  10. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  11. final def expectedDeliveryId: Option[DeliveryId]

    Permalink

    returns

    the current expected deliveryId of this Task.

  12. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  13. final def finish(receivedMessage: Any, correlationId: CorrelationId): Unit

    Permalink

    Signals that this task has finished.

    Signals that this task has finished.

    receivedMessage

    the received message that signaled this task has finished.

  14. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  15. final def hasFinished: Boolean

    Permalink

    returns

    whether this task status is Finished.

  16. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  17. final val index: Int

    Permalink
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. final def isWaiting: Boolean

    Permalink

    returns

    whether this task status is Waiting.

  20. final def matchSenderAndId(correlationId: CorrelationId): Boolean

    Permalink

    correlationId

    the correlationId obtained from the received message.

    returns

    true if · This task status is Waiting · The actor path of the sender is the same as destination. · The delivery id resolved from the correlation id is the expected delivery id for this task. false otherwise.

  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def start(): Unit

    Permalink

    Starts the execution of this task.

    Starts the execution of this task. If this task is already Waiting or Finished an error will be logged.

    We first persist that the message was sent, then we send it. If the Orchestrator is recovering then we just send the message because there is no need to persist that the message was sent.

    Attributes
    protected[pt.tecnico.dsi.akkastrator]
  25. final def status: Status

    Permalink

    returns

    the current status of this Task.

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

    Permalink
    Definition Classes
    AnyRef
  27. final def terminateEarly(receivedMessage: Any, correlationId: CorrelationId): Unit

    Permalink

    This will cause this task orchestrator to terminate early.

    This will cause this task orchestrator to terminate early. An early termination will have the following effects: · This task will be finished. · Every unstarted task will be prevented from starting even if its dependencies have finished. · Tasks that are waiting will remain untouched and the orchestrator will still be prepared to handle their responses. · The method onEarlyTermination will be invoked in the orchestrator. · The method onFinish will NEVER be called even if the only tasks needed to finish the orchestrator are already waiting and the responses are received. You can always call onFinish from inside onEarlyTermination to implement the same termination strategy in both cases.

  28. def toString(): String

    Permalink
    Definition Classes
    Task → AnyRef → Any
  29. final def toTaskStatus: TaskStatus

    Permalink

    The TaskStatus representation of this task.

  30. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  33. def withLoggingPrefix(message: ⇒ String): String

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped