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 super tightly coupled with Orchestrator and the reverse is also true.

This class changes the internal state of the orchestrator:

In exchange the orchestrator changes the internal state of the task:

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 if matchDeliveryId(m) => //Some code
    }

    Will cause the orchestrator to fail.

  2. abstract def createMessage(deliveryId: Long): 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[Long]

    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, deliveryId: Long): 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. 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 matchDeliveryId(deliverId: Long): Boolean

    Permalink

    deliverId

    the deliveryId obtained from the received message.

    returns

    true if the deliveryId of receivedMessage is the same as the one this task is expecting. 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: Task.Status

    Permalink

    returns

    the current status of this Task.

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

    Permalink
    Definition Classes
    AnyRef
  27. def toString(): String

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

    Permalink

    The TaskStatus representation of this task.

  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 withLoggingPrefix(message: String): String

    Permalink

Inherited from AnyRef

Inherited from Any

Ungrouped