Class

no.nextgentel.oss.akkatools.aggregate

AbstractGeneralAggregate

Related Doc: package aggregate

Permalink

abstract class AbstractGeneralAggregate[S <: AggregateStateJava] extends GeneralAggregate[Any, AggregateStateJava]

Inspired by akka.actor.AbstractActor

Use CmdToEventBuilder the same way you use ReceiveBuilder

S

The type representing your state

Linear Supertypes
GeneralAggregate[Any, AggregateStateJava], GeneralAggregateBase[Any, AggregateStateJava], EnhancedPersistentShardingActor[Any, AggregateError], EnhancedPersistentActor[Any, AggregateError], MdcSupport[Any], BeforeAndAfterEventAndCommand[Any], DiagnosticActorLogging, AtLeastOnceDelivery, AtLeastOnceDeliveryLike, PersistentActor, Eventsourced, PersistenceRecovery, PersistenceIdentity, PersistenceStash, StashFactory, Stash, RequiresMessageQueue[DequeBasedMessageQueueSemantics], UnrestrictedStash, StashSupport, Snapshotter, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractGeneralAggregate
  2. GeneralAggregate
  3. GeneralAggregateBase
  4. EnhancedPersistentShardingActor
  5. EnhancedPersistentActor
  6. MdcSupport
  7. BeforeAndAfterEventAndCommand
  8. DiagnosticActorLogging
  9. AtLeastOnceDelivery
  10. AtLeastOnceDeliveryLike
  11. PersistentActor
  12. Eventsourced
  13. PersistenceRecovery
  14. PersistenceIdentity
  15. PersistenceStash
  16. StashFactory
  17. Stash
  18. RequiresMessageQueue
  19. UnrestrictedStash
  20. StashSupport
  21. Snapshotter
  22. Actor
  23. AnyRef
  24. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractGeneralAggregate(initialState: AggregateStateJava, dmSelf: ActorPath)

    Permalink

    initialState

    he initial value your state should start with - before anything has happened

    dmSelf

    dmSelf is used as the address where the DM-confirmation-messages should be sent. In a sharding environment, this has to be our dispatcher which knows how to reach the sharding mechanism. If null, we'll fallback to self - useful when testing

Type Members

  1. case class GenerateDMInfo(generateDMViaEvent: Option[PartialFunction[E, ResultingDurableMessages]], generateDMViaState: Option[PartialFunction[S, ResultingDurableMessages]], generateDMViaStateAndEvent: Option[PartialFunction[(S, E), ResultingDurableMessages]], applyEventBefore: Boolean) extends Product with Serializable

    Permalink
    Attributes
    protected
    Definition Classes
    GeneralAggregate
  2. type Receive = PartialFunction[Any, Unit]

    Permalink
    Definition Classes
    Actor

Abstract Value Members

  1. abstract def persistenceIdBase(): String

    Permalink

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. def afterOnEvent(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    BeforeAndAfterEventAndCommand
  5. def afterTryCommand(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    BeforeAndAfterEventAndCommand
  6. def aroundPostRestart(reason: Throwable): Unit

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

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

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

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

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    DiagnosticActorLogging → Actor
  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. def beforeOnEvent(event: Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    MdcSupportBeforeAndAfterEventAndCommand
  13. def beforeTryCommand(cmd: AnyRef): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    MdcSupportBeforeAndAfterEventAndCommand
  14. def canSendAsDM(): Boolean

    Permalink
    Definition Classes
    EnhancedPersistentActor
  15. def canSendAsDurableMessage(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    GeneralAggregate
  16. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  17. def cmdToEvent: PartialFunction[AggregateCmd, ResultingEvent[Any]]

    Permalink
  18. def cmdToEvent(_cmdToEvent: PartialFunction[AggregateCmd, ResultingEventJava]): Unit

    Permalink
  19. def confirmDelivery(deliveryId: Long): Boolean

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  20. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  21. var currentLogLevelInfo: Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  22. def defaultMdc(): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    MdcSupport
  23. def defaultTimeToWaitAfterMaxRedeliverAttemptsBeforeTimeout(): FiniteDuration

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  24. def deferAsync[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  25. def deleteMessages(toSequenceNr: Long): Unit

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

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

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

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

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  30. lazy val dispatchId: String

    Permalink
  31. def doUnconfirmedWarningProcessing(): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  32. def durableMessageNotDeliveredHandler(originalPayload: Any, errorMsg: String): Unit

    Permalink

    If doUnconfirmedWarningProcessing is turned on, then override this method to try to do something useful before we give up

    If doUnconfirmedWarningProcessing is turned on, then override this method to try to do something useful before we give up

    Attributes
    protected
    Definition Classes
    GeneralAggregateBaseEnhancedPersistentActor
  33. implicit val ec: ExecutionContextExecutor

    Permalink
    Definition Classes
    EnhancedPersistentActor
  34. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  36. def extractMdc(eventOrCmd: AnyRef): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    MdcSupport
  37. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  38. def generateDM: PartialFunction[AggregateStateJava, ResultingDurableMessages]

    Permalink
    Definition Classes
    GeneralAggregate
  39. def generateDMAfter: PartialFunction[Any, ResultingDurableMessages]

    Permalink
    Definition Classes
    GeneralAggregate
  40. def generateDMBefore: PartialFunction[Any, ResultingDurableMessages]

    Permalink
    Definition Classes
    GeneralAggregate
  41. def generateDMSE: PartialFunction[(AggregateStateJava, Any), ResultingDurableMessages]

    Permalink
    Definition Classes
    GeneralAggregate
  42. def generateDMs(e: Any, previousState: AggregateStateJava): ResultingDMs

    Permalink
    Definition Classes
    GeneralAggregateGeneralAggregateBase
  43. def generateEventsForFailedDurableMessage(originalPayload: Any, errorMsg: String): Seq[Any]

    Permalink

    Override this to decide if the failed outbound durableMessage should result in a persisted event.

    Override this to decide if the failed outbound durableMessage should result in a persisted event. If so, return these events. When these have been persisted, generateDMs() will be called as usual enabling you to perform some outbound action.

    Definition Classes
    GeneralAggregateBase
  44. def generateResultingDurableMessages: PartialFunction[Any, ResultingDurableMessages]

    Permalink
  45. def generateResultingDurableMessages(_generateResultingDurableMessages: PartialFunction[Any, ResultingDurableMessages]): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  47. def getDMGeneratingVersion: Int

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  48. def getDMSelf(): ActorPath

    Permalink
  49. def getDeliverySnapshot: AtLeastOnceDeliverySnapshot

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  50. def getState(): S

    Permalink
  51. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  52. def idleTimeout(): FiniteDuration

    Permalink
    Definition Classes
    EnhancedPersistentActor
  53. lazy val idleTimeoutValueToUse: FiniteDuration

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  54. def internalProcessUnconfirmedWarning(unconfirmedWarning: UnconfirmedWarning): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GeneralAggregateBaseEnhancedPersistentActor
  55. def internalStashOverflowStrategy: StashOverflowStrategy

    Permalink
    Definition Classes
    PersistenceStash
  56. def isExpectedError(e: Exception): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  57. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  58. def journalPluginId: String

    Permalink
    Definition Classes
    PersistenceIdentity
  59. def lastSequenceNr: Long

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

    Permalink
    Definition Classes
    Snapshotter
  61. val log: DiagnosticLoggingAdapter

    Permalink
    Definition Classes
    DiagnosticActorLogging
  62. def logMessage(message: String): Unit

    Permalink
    Definition Classes
    EnhancedPersistentActor
  63. def maxUnconfirmedMessages: Int

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  64. def mdc(currentMessage: Any): MDC

    Permalink
    Definition Classes
    MdcSupport → DiagnosticActorLogging
  65. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  66. def nextState(): AggregateStateJava

    Permalink
    Definition Classes
    GeneralAggregate
  67. final def notify(): Unit

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

    Permalink
    Definition Classes
    AnyRef
  69. def numberOfUnconfirmed: Int

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  70. def onAlreadyProcessedCmdViaDMReceivedAgain(cmd: AnyRef): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GeneralAggregateBaseEnhancedPersistentActor
  71. def onApplyingLiveEvent(event: Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  72. def onEvent: PartialFunction[Any, Unit]

    Permalink
  73. def onInactiveTimeout(): Unit

    Permalink

    Called when actor has been idle for too long..

    Called when actor has been idle for too long..

    If running in sharding, you should stop like this:

    getContext().parent().tell(new ShardRegion.Passivate(PoisonPill.getInstance()), self());

    Attributes
    protected
    Definition Classes
    EnhancedPersistentShardingActorEnhancedPersistentActor
  74. def onPersistFailure(cause: Throwable, event: Any, seqNr: Long): Unit

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

    Permalink
    Attributes
    protected
    Definition Classes
    Eventsourced
  76. def onReceiveRecover(event: Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  77. def onRecoveryCompleted(): Unit

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

    Permalink
    Attributes
    protected
    Definition Classes
    Eventsourced
  79. def persist[A](event: A)(handler: (A) ⇒ Unit): Unit

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

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

    Permalink
    Definition Classes
    Eventsourced
  82. def persistAndApplyEvent(event: Any, successHandler: () ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  83. def persistAndApplyEvent(event: Any): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  84. def persistAndApplyEvents(events: List[Any], successHandler: () ⇒ Unit): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  85. def persistAndApplyEvents(events: List[Any]): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  86. def persistAsync[A](event: A)(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
  87. def persistenceId: String

    Permalink
    Definition Classes
    EnhancedPersistentShardingActor → PersistenceIdentity
  88. def postRestart(reason: Throwable): Unit

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

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

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

    Permalink
    Definition Classes
    EnhancedPersistentActor → Actor
  92. def previousState(): AggregateStateJava

    Permalink
    Definition Classes
    GeneralAggregate
  93. def receive: Receive

    Permalink
    Definition Classes
    PersistentActor → Actor
  94. def receiveCommand: Receive

    Permalink
    Definition Classes
    EnhancedPersistentActor → Eventsourced
  95. def receiveRecover: Receive

    Permalink
    Definition Classes
    EnhancedPersistentActor → Eventsourced
  96. def recovery: Recovery

    Permalink
    Definition Classes
    PersistenceRecovery
  97. def recoveryFinished: Boolean

    Permalink
    Definition Classes
    Eventsourced
  98. def recoveryRunning: Boolean

    Permalink
    Definition Classes
    Eventsourced
  99. def redeliverInterval: FiniteDuration

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  100. def redeliveryBurstLimit: Int

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  101. def saveSnapshot(snapshot: Any): Unit

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

    Permalink
    Definition Classes
    Actor
  103. def sendAsDM(sendAsDM: SendAsDM): Unit

    Permalink
  104. def sendAsDM(payload: AnyRef, destinationActor: ActorPath): Unit

    Permalink
  105. def sendAsDM(payload: AnyRef, destinationActor: ActorPath, confirmationRoutingInfo: AnyRef): Unit

    Permalink
    Definition Classes
    EnhancedPersistentActor
  106. def sendAsDurableMessage(payload: AnyRef, destinationActor: ActorPath): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GeneralAggregate
  107. def sendAsDurableMessage(payload: AnyRef, destinationActor: ActorPath, confirmationRoutingInfo: AnyRef): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GeneralAggregate
  108. def sendAsDurableMessage(sendAsDurableMessage: SendAsDurableMessage): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    GeneralAggregate
  109. final def sender(): ActorRef

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

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike
  111. def setLogLevels(eventLogLevelInfo: Boolean, recoveringEventLogLevelInfo: Boolean, cmdLogLevelInfo: Boolean): Unit

    Permalink

    eventLogLevelInfo

    Used when processing events live - not recovering

    recoveringEventLogLevelInfo

    Used when recovering events

    cmdLogLevelInfo

    Used when processing commands

    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  112. def setMdcValue(name: String, value: String): Unit

    Permalink
    Attributes
    protected
    Definition Classes
    MdcSupport
  113. def snapshotPluginId: String

    Permalink
    Definition Classes
    PersistenceIdentity
  114. def snapshotSequenceNr: Long

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

    Permalink
    Definition Classes
    Eventsourced → Snapshotter
  116. def stash(): Unit

    Permalink
    Definition Classes
    StashSupport
  117. var state: AggregateStateJava

    Permalink
  118. def stateInfo(): String

    Permalink
    Attributes
    protected
    Definition Classes
    GeneralAggregateBaseEnhancedPersistentActor
  119. def supervisorStrategy: SupervisorStrategy

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  122. def toStringForLogging[T](o: T): String

    Permalink
    Attributes
    protected
    Definition Classes
    EnhancedPersistentActor
  123. final def tryCommand: PartialFunction[AnyRef, Unit]

    Permalink
  124. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Eventsourced → Actor
  125. def unstashAll(): Unit

    Permalink
    Definition Classes
    Eventsourced → StashSupport
  126. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  129. def warnAfterNumberOfUnconfirmedAttempts: Int

    Permalink
    Definition Classes
    AtLeastOnceDeliveryLike

Deprecated Value Members

  1. def persist[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use persistAll instead

  2. def persistAsync[A](events: Seq[A])(handler: (A) ⇒ Unit): Unit

    Permalink
    Definition Classes
    Eventsourced
    Annotations
    @deprecated
    Deprecated

    (Since version 2.4) use persistAllAsync instead

Inherited from GeneralAggregate[Any, AggregateStateJava]

Inherited from MdcSupport[Any]

Inherited from BeforeAndAfterEventAndCommand[Any]

Inherited from DiagnosticActorLogging

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

Ungrouped