Class

pt.tecnico.dsi.akkastrator

Quorum

Related Doc: package akkastrator

Permalink

class Quorum[R] extends Orchestrator[R]

Source
TaskQuorum.scala
Linear Supertypes
Type Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Quorum
  2. Orchestrator
  3. AbstractOrchestrator
  4. IdImplicits
  5. ActorLogging
  6. AtLeastOnceDelivery
  7. AtLeastOnceDeliveryLike
  8. PersistentActor
  9. Eventsourced
  10. PersistenceRecovery
  11. PersistenceIdentity
  12. PersistenceStash
  13. StashFactory
  14. Stash
  15. RequiresMessageQueue
  16. UnrestrictedStash
  17. StashSupport
  18. Snapshotter
  19. Actor
  20. AnyRef
  21. Any
Implicitly
  1. by any2stringadd
  2. by StringFormat
  3. by Ensuring
  4. by ArrowAssoc
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Quorum(taskBuilders: Iterable[TaskBuilder[R]], minimumVotes: MinimumVotes, outerOrchestratorPersistenceId: String)

    Permalink

Type Members

  1. final type ID = DeliveryId

    Permalink

    The type of Id this orchestrator handles.

    The type of Id this orchestrator handles.

    Definition Classes
    OrchestratorAbstractOrchestrator
  2. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. def +(other: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Quorum[R] to any2stringadd[Quorum[R]] performed by method any2stringadd in scala.Predef.
    Definition Classes
    any2stringadd
  4. def ->[B](y: B): (Quorum[R], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Quorum[R] to ArrowAssoc[Quorum[R]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc
    Annotations
    @inline()
  5. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  6. final var _waitingTasks: HashMap[Int, Task[_]]

    Permalink

    We use a HashMap to ensure remove/insert operations are very fast O(eC).

    We use a HashMap to ensure remove/insert operations are very fast O(eC). The keys are the task indexes.

    Attributes
    protected[this]
    Definition Classes
    AbstractOrchestrator
  7. final def alwaysAvailableCommands: akka.actor.Actor.Receive

    Permalink
    Definition Classes
    AbstractOrchestrator
  8. def aroundPostRestart(reason: Throwable): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Eventsourced → Actor
  9. def aroundPostStop(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    AtLeastOnceDeliveryLike → Eventsourced → Actor
  10. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    AtLeastOnceDeliveryLike → Eventsourced → Actor
  11. def aroundPreStart(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Eventsourced → Actor
  12. def aroundReceive(receive: Receive, message: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    AtLeastOnceDeliveryLike → Eventsourced → Actor
  13. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  14. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  15. final def computeCurrentBehavior(): Receive

    Permalink
    Definition Classes
    AbstractOrchestrator
  16. final def computeID(destination: ActorPath, deliveryId: DeliveryId): DeliveryId

    Permalink

    Computes ID from the deliveryId of akka-persistence.

    Computes ID from the deliveryId of akka-persistence.

    Definition Classes
    OrchestratorAbstractOrchestrator
  17. def confirmDelivery(deliveryId: Long): Boolean

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  18. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  19. def defer[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    PersistentActor
  20. def deferAsync[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    PersistentActor
  21. def deleteMessages(toSequenceNr: Long): Unit

    Permalink
    Definition Classes
    Eventsourced
  22. def deleteSnapshot(sequenceNr: Long): Unit

    Permalink
    Definition Classes
    Snapshotter
  23. def deleteSnapshots(criteria: SnapshotSelectionCriteria): Unit

    Permalink
    Definition Classes
    Snapshotter
  24. def deliver(destination: ActorSelection)(deliveryIdToMessage: (Long) ⇒ Any): Unit

    Permalink
    Definition Classes
    AtLeastOnceDelivery
  25. def deliver(destination: ActorPath)(deliveryIdToMessage: (Long) ⇒ Any): Unit

    Permalink
    Definition Classes
    AtLeastOnceDelivery
  26. final def deliveryIdOf(destination: ActorPath, id: ID): DeliveryId

    Permalink

    Converts ID to the deliveryId needed for the confirmDelivery method of akka-persistence.

    Converts ID to the deliveryId needed for the confirmDelivery method of akka-persistence.

    Definition Classes
    OrchestratorAbstractOrchestrator
  27. def ensuring(cond: (Quorum[R]) ⇒ Boolean, msg: ⇒ Any): Quorum[R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Quorum[R] to Ensuring[Quorum[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  28. def ensuring(cond: (Quorum[R]) ⇒ Boolean): Quorum[R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Quorum[R] to Ensuring[Quorum[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  29. def ensuring(cond: Boolean, msg: ⇒ Any): Quorum[R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Quorum[R] to Ensuring[Quorum[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  30. def ensuring(cond: Boolean): Quorum[R]

    Permalink
    Implicit information
    This member is added by an implicit conversion from Quorum[R] to Ensuring[Quorum[R]] performed by method Ensuring in scala.Predef.
    Definition Classes
    Ensuring
  31. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  33. def extraCommands: akka.actor.Actor.Receive

    Permalink

    Override this method to add extra commands that are always handled by this orchestrator (except when recovering).

    Override this method to add extra commands that are always handled by this orchestrator (except when recovering).

    Definition Classes
    AbstractOrchestrator
  34. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  35. final def finishedTasks: Int

    Permalink

    How many tasks of this orchestrator have successfully finished.

    How many tasks of this orchestrator have successfully finished. Aborted tasks do not count as a finished task.

    Definition Classes
    AbstractOrchestrator
  36. def formatted(fmtstr: String): String

    Permalink
    Implicit information
    This member is added by an implicit conversion from Quorum[R] to StringFormat[Quorum[R]] performed by method StringFormat in scala.Predef.
    Definition Classes
    StringFormat
    Annotations
    @inline()
  37. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  38. def getDeliverySnapshot: AtLeastOnceDeliverySnapshot

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  39. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  40. def internalStashOverflowStrategy: StashOverflowStrategy

    Permalink
    Definition Classes
    PersistenceStash
  41. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  42. def journalPluginId: String

    Permalink
    Definition Classes
    PersistenceIdentity
  43. def lastSequenceNr: Long

    Permalink
    Definition Classes
    Eventsourced
  44. def loadSnapshot(persistenceId: String, criteria: SnapshotSelectionCriteria, toSequenceNr: Long): Unit

    Permalink
    Definition Classes
    Snapshotter
  45. def log: LoggingAdapter

    Permalink
    Definition Classes
    ActorLogging
  46. final def matchId(task: Task[_], id: Long): Boolean

    Permalink

    Ensures the received message was in fact destined to be received by task.

    Ensures the received message was in fact destined to be received by task.

    Definition Classes
    OrchestratorAbstractOrchestrator
  47. def maxUnconfirmedMessages: Int

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  48. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  51. def numberOfUnconfirmed: Int

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  52. def onAbort(failure: Failure): Unit

    Permalink

    User overridable callback.

    User overridable callback. Its called when the orchestrator is aborted. By default an orchestrator aborts as soon as a task aborts. However this functionality can be changed by overriding onTaskAbort.

    By default logs that the orchestrator has aborted, sends a message to its parent explaining why the orchestrator aborted then stops it.

    You can use this to implement your termination strategy.

    Definition Classes
    AbstractOrchestrator
  53. def onFinish(): Unit

    Permalink

    User overridable callback.

    User overridable callback. Its called after every task finishes. If a task aborts then it will prevent this method from being invoked.

    By default logs that the Orchestrator has finished then stops it.

    You can use this to implement your termination strategy.

    If a orchestrator starts without tasks it will finish right away.

    Definition Classes
    QuorumAbstractOrchestrator
  54. def onPersistFailure(cause: Throwable, event: Any, seqNr: Long): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Eventsourced
  55. def onPersistRejected(cause: Throwable, event: Any, seqNr: Long): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Eventsourced
  56. def onRecoveryFailure(cause: Throwable, event: Option[Any]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    Eventsourced
  57. def onStart(startId: Long): Unit

    Permalink

    User overridable callback.

    User overridable callback. Its called after the orchestrator starts but before any of the tasks start.

    By default logs that the Orchestrator has started.

    Definition Classes
    QuorumAbstractOrchestrator
  58. def onTaskAbort(task: FullTask[_, _], cause: Throwable): Unit

    Permalink

    User overridable callback.

    User overridable callback. Its called every time a task aborts.

    You can use this to implement very refined termination strategies.

    By default aborts the orchestrator via onAbort with a TaskAborted failure.

    Note: if you invoke become/unbecome inside this method, the contract that states "Waiting tasks or tasks which do not have this task as a dependency will remain untouched" will no longer be guaranteed. If you wish to still have this guarantee you can do

    context.become(computeCurrentBehavior() orElse yourBehavior)

    { @see onTaskStart} for a callback when a task starts. { @see onTaskFinish } for a callback when a task finishes.

    task

    the task that aborted.

    Definition Classes
    QuorumAbstractOrchestrator
  59. def onTaskFinish(task: FullTask[_, _]): Unit

    Permalink

    User overridable callback.

    User overridable callback. Its called every time a task finishes.

    You can use this to implement very refined termination strategies.

    By default just logs the task has finished.

    { @see onTaskStart} for a callback when a task starts. { @see onTaskAbort} for a callback when a task aborts.

    Definition Classes
    QuorumAbstractOrchestrator
  60. def onTaskStart(task: FullTask[_, _], innerTask: Task[_]): Unit

    Permalink

    User overridable callback.

    User overridable callback. Its called every time a task starts.

    By default just logs the task as started.

    { @see onTaskFinish} for a callback when a task finishes. { @see onTaskAbort} for a callback when a task aborts.

    Definition Classes
    AbstractOrchestrator
  61. implicit final val orchestrator: AbstractOrchestrator[_]

    Permalink

    This exists to make the creation of FullTasks easier.

    This exists to make the creation of FullTasks easier.

    Definition Classes
    AbstractOrchestrator
  62. def persist[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    PersistentActor
  63. def persistAll[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    PersistentActor
  64. def persistAllAsync[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    PersistentActor
  65. def persistAsync[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    PersistentActor
  66. def persistenceId: String

    Permalink
    Definition Classes
    Quorum → PersistenceIdentity
  67. def pluralize(word: String, count: Int): String

    Permalink
    Attributes
    protected
  68. def postRestart(reason: Throwable): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  69. def postStop(): Unit

    Permalink
    Definition Classes
    UnrestrictedStash → Actor
  70. def preRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Definition Classes
    UnrestrictedStash → Actor
  71. def preStart(): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  72. def quorumStatus: String

    Permalink
    Attributes
    protected
  73. def receive: Receive

    Permalink
    Definition Classes
    PersistentActor → Actor
  74. final def receiveCommand: akka.actor.Actor.Receive

    Permalink
    Definition Classes
    AbstractOrchestrator → Eventsourced
  75. def receiveRecover: akka.actor.Actor.Receive

    Permalink
    Definition Classes
    AbstractOrchestrator → Eventsourced
  76. def recovery: Recovery

    Permalink
    Definition Classes
    PersistenceRecovery
  77. final def recoveryAwarePersist(event: Any)(handler: ⇒ Unit): Unit

    Permalink
    Definition Classes
    AbstractOrchestrator
  78. def recoveryFinished: Boolean

    Permalink
    Definition Classes
    Eventsourced
  79. def recoveryRunning: Boolean

    Permalink
    Definition Classes
    Eventsourced
  80. def redeliverInterval: FiniteDuration

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  81. def redeliveryBurstLimit: Int

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  82. val resultsCount: Map[R, Int]

    Permalink
    Attributes
    protected
  83. def saveSnapshot(snapshot: Any): Unit

    Permalink
    Definition Classes
    Snapshotter
  84. implicit final val self: ActorRef

    Permalink
    Definition Classes
    Actor
  85. final def sender(): ActorRef

    Permalink
    Definition Classes
    Actor
  86. def setDeliverySnapshot(snapshot: AtLeastOnceDeliverySnapshot): Unit

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  87. val settings: Settings

    Permalink

    the settings to use for this orchestrator.

    the settings to use for this orchestrator.

    Definition Classes
    AbstractOrchestrator
  88. def snapshotPluginId: String

    Permalink
    Definition Classes
    PersistenceIdentity
  89. def snapshotSequenceNr: Long

    Permalink
    Definition Classes
    Eventsourced → Snapshotter
  90. def snapshotterId: String

    Permalink
    Definition Classes
    Eventsourced → Snapshotter
  91. final def startId: Long

    Permalink
    Definition Classes
    AbstractOrchestrator
  92. def stash(): Unit

    Permalink
    Definition Classes
    Eventsourced → StashSupport
  93. def supervisorStrategy: SupervisorStrategy

    Permalink
    Definition Classes
    Actor
  94. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  95. final def tasks: Seq[FullTask[_, _]]

    Permalink
    Definition Classes
    AbstractOrchestrator
  96. implicit def toCorrelationId(l: Long): CorrelationId

    Permalink
    Definition Classes
    IdImplicits
  97. implicit def toDeliveryId(l: Long): DeliveryId

    Permalink
    Definition Classes
    IdImplicits
  98. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  99. final var tolerance: Int

    Permalink

    Tolerance = how many votes the quorum can afford to not obtain/lose (due to an aborted task) such that its not necessary to terminate the quorum.

    Tolerance = how many votes the quorum can afford to not obtain/lose (due to an aborted task) such that its not necessary to terminate the quorum. For example: if the quorum has 5 tasks and minimumVotes = Majority = 3 then at most 2 tasks can abort/not answer if 3 tasks abort then we need to abort the orchestrator.

  100. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Eventsourced → Actor
  101. final def unstarted: akka.actor.Actor.Receive

    Permalink
    Definition Classes
    AbstractOrchestrator
  102. def unstashAll(): Unit

    Permalink
    Definition Classes
    Eventsourced → StashSupport
  103. final val votesToAchieveQuorum: Int

    Permalink
  104. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  107. final def waitingTasks: HashMap[Int, Task[_]]

    Permalink
    Definition Classes
    AbstractOrchestrator
  108. def warnAfterNumberOfUnconfirmedAttempts: Int

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  109. var winningResult: R

    Permalink
    Attributes
    protected
  110. var winningResultCount: Int

    Permalink
    Attributes
    protected
  111. def withLogPrefix(message: ⇒ String): String

    Permalink
    Definition Classes
    AbstractOrchestrator
  112. def [B](y: B): (Quorum[R], B)

    Permalink
    Implicit information
    This member is added by an implicit conversion from Quorum[R] to ArrowAssoc[Quorum[R]] performed by method ArrowAssoc in scala.Predef.
    Definition Classes
    ArrowAssoc

Inherited from Orchestrator[R]

Inherited from AbstractOrchestrator[R]

Inherited from IdImplicits

Inherited from ActorLogging

Inherited from AtLeastOnceDelivery

Inherited from AtLeastOnceDeliveryLike

Inherited from PersistentActor

Inherited from Eventsourced

Inherited from PersistenceRecovery

Inherited from PersistenceIdentity

Inherited from PersistenceStash

Inherited from StashFactory

Inherited from Stash

Inherited from RequiresMessageQueue[DequeBasedMessageQueueSemantics]

Inherited from UnrestrictedStash

Inherited from StashSupport

Inherited from Snapshotter

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Inherited by implicit conversion any2stringadd from Quorum[R] to any2stringadd[Quorum[R]]

Inherited by implicit conversion StringFormat from Quorum[R] to StringFormat[Quorum[R]]

Inherited by implicit conversion Ensuring from Quorum[R] to Ensuring[Quorum[R]]

Inherited by implicit conversion ArrowAssoc from Quorum[R] to ArrowAssoc[Quorum[R]]

Ungrouped