Class

com.rbmhtechnology.eventuate

AbstractEventsourcedActor

Related Doc: package eventuate

Permalink

abstract class AbstractEventsourcedActor extends AbstractEventsourcedView with EventsourcedActor with ConfirmedDelivery with PersistOnEvent

Java API for actors that implement EventsourcedActor.

See also

EventsourcedActor

AbstractEventsourcedView for a detailed usage of the Java API

Linear Supertypes
PersistOnEvent, ConfirmedDelivery, EventsourcedActor, AbstractEventsourcedView, AbstractEventsourcedComponent, ConditionalRequests, EventsourcedVersion, EventsourcedView, Stash, RequiresMessageQueue[DequeBasedMessageQueueSemantics], UnrestrictedStash, StashSupport, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractEventsourcedActor
  2. PersistOnEvent
  3. ConfirmedDelivery
  4. EventsourcedActor
  5. AbstractEventsourcedView
  6. AbstractEventsourcedComponent
  7. ConditionalRequests
  8. EventsourcedVersion
  9. EventsourcedView
  10. Stash
  11. RequiresMessageQueue
  12. UnrestrictedStash
  13. StashSupport
  14. Actor
  15. AnyRef
  16. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractEventsourcedActor(id: String, eventLog: ActorRef)

    Permalink

Type Members

  1. type Handler[A] = (Try[A]) ⇒ Unit

    Permalink
    Definition Classes
    EventsourcedView
  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. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def aggregateId: Option[String]

    Permalink

    Optional aggregate id.

    Optional aggregate id. It is used for routing DurableEvents to event-sourced destinations which can be EventsourcedViews or EventsourcedActors. By default, an event is routed to an event-sourced destination with an undefined aggregateId. If a destination's aggregateId is defined it will only receive events with a matching aggregate id in DurableEvent#destinationAggregateIds.

    Definition Classes
    AbstractEventsourcedComponent → EventsourcedView
  5. def aroundPostRestart(reason: Throwable): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  6. def aroundPostStop(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  7. def aroundPreRestart(reason: Throwable, message: Option[Any]): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  8. def aroundPreStart(): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  9. def aroundReceive(receive: akka.actor.Actor.Receive, msg: Any): Unit

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
    Annotations
    @InternalApi()
  10. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  12. def commandContext: BehaviorContext

    Permalink

    Returns the command BehaviorContext.

    Returns the command BehaviorContext.

    Definition Classes
    EventsourcedView
  13. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  14. def createOnCommand(): akka.actor.AbstractActor.Receive

    Permalink

    Java API of the command handler.

    Java API of the command handler.

    Returns a receive object that defines the actor's command handling behaviour. Use ReceiveBuilder to define the behaviour.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  15. def createOnEvent(): akka.actor.AbstractActor.Receive

    Permalink

    Java API of the event handler.

    Java API of the event handler.

    Returns a receive object that defines the actor's event handling behaviour. Use ReceiveBuilder to define the behaviour.

    Definition Classes
    AbstractEventsourcedView
    See also

    EventsourcedView

  16. def createOnRecovery(): ResultHandler[Unit]

    Permalink

    Java API of the recovery handler.

    Java API of the recovery handler.

    Returns a result handler that defines the actor's recover handling behaviour. Use ResultHandler to define the behaviour.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  17. def createOnSnapshot(): akka.actor.AbstractActor.Receive

    Permalink

    Java API of the snapshot handler.

    Java API of the snapshot handler.

    Returns a receive object that defines the actor's snapshot handling behaviour. Use ReceiveBuilder to define the behaviour.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  18. def deliver(deliveryId: String, message: Any, destination: ActorPath): Unit

    Permalink

    Delivers the given message to a destination.

    Delivers the given message to a destination. The delivery of message is identified by the given deliveryId which must be unique in context of the sending actor. The message is tracked as unconfirmed message until delivery is confirmed by persisting a confirmation event with persistConfirmation, using the same deliveryId.

    Definition Classes
    ConfirmedDelivery
  19. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. def eventContext: BehaviorContext

    Permalink

    Returns the event BehaviorContext.

    Returns the event BehaviorContext.

    Definition Classes
    EventsourcedView
  22. val eventLog: ActorRef

    Permalink

    Event log actor.

    Event log actor.

    Definition Classes
    AbstractEventsourcedViewEventsourcedView
  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def getAggregateId: Optional[String]

    Permalink

    Java API of aggregateId.

    Java API of aggregateId.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

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

    Permalink
    Definition Classes
    AnyRef → Any
  26. final def getCommandContext: AbstractEventsourcedComponent.BehaviorContext

    Permalink

    Java API of commandContext.

    Java API of commandContext.

    Returns the command BehaviorContext.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  27. def getContext: ActorContext

    Permalink

    Returns this AbstractActor's ActorContext.

    Returns this AbstractActor's ActorContext. Mimics AbstractActor.getContext.

    Definition Classes
    AbstractEventsourcedComponent
  28. final def getEventContext: AbstractEventsourcedComponent.BehaviorContext

    Permalink

    Java API of eventContext.

    Java API of eventContext.

    Returns the event BehaviorContext.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  29. final def getLastEmitterAggregateId: Optional[String]

    Permalink

    Java API of lastEmitterAggregateId.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  30. final def getLastEmitterId: String

    Permalink

    Java API of lastEmitterId.

    Java API of lastEmitterId.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  31. final def getLastSequenceNr: Long

    Permalink

    Java API of lastSequenceNr.

    Java API of lastSequenceNr.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  32. final def getLastSystemTimestamp: Long

    Permalink

    Java API of lastSystemTimestamp.

    Java API of lastSystemTimestamp.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  33. final def getLastVectorTimestamp: VectorTime

    Permalink

    Java API of lastVectorTimestamp.

    Java API of lastVectorTimestamp.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  34. def getSelf: ActorRef

    Permalink

    Returns the ActorRef for this actor.

    Returns the ActorRef for this actor. Mimics AbstractActor.getSelf.

    Definition Classes
    AbstractEventsourcedComponent
  35. def getSender: ActorRef

    Permalink

    The reference sender Actor of the currently processed message.

    The reference sender Actor of the currently processed message. Mimics AbstractActor.getSender.

    Definition Classes
    AbstractEventsourcedComponent
  36. final def getSnapshotContext: AbstractEventsourcedComponent.BehaviorContext

    Permalink

    Java API of snapshotContext.

    Java API of snapshotContext.

    Returns the snapshot BehaviorContext.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  37. final def getUnconfirmed: Set[String]

    Permalink

    Java API of unconfirmed.

    Java API of unconfirmed.

    See also

    ConfirmedDelivery

  38. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  39. val id: String

    Permalink

    Global unique actor id.

    Global unique actor id.

    Definition Classes
    AbstractEventsourcedViewEventsourcedView
  40. val instanceId: Int

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

    Permalink
    Definition Classes
    Any
  42. final def isRecovering: Boolean

    Permalink

    Java API of lastEmirecoveringterId.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  43. final def lastEmitterAggregateId: Option[String]

    Permalink

    Emitter aggregate id of the last handled event.

    Emitter aggregate id of the last handled event.

    Definition Classes
    EventsourcedView
  44. final def lastEmitterId: String

    Permalink

    Emitter id of the last handled event.

    Emitter id of the last handled event.

    Definition Classes
    EventsourcedView
  45. final def lastProcessId: String

    Permalink

    Id of the local event log that initially wrote the event.

    Id of the local event log that initially wrote the event.

    Definition Classes
    EventsourcedView
  46. final def lastSequenceNr: Long

    Permalink

    Sequence number of the last handled event.

    Sequence number of the last handled event.

    Definition Classes
    EventsourcedView
  47. final def lastSystemTimestamp: Long

    Permalink

    Wall-clock timestamp of the last handled event.

    Wall-clock timestamp of the last handled event.

    Definition Classes
    EventsourcedView
  48. final def lastVectorTimestamp: VectorTime

    Permalink

    Vector timestamp of the last handled event.

    Vector timestamp of the last handled event.

    Definition Classes
    EventsourcedView
  49. val logger: LoggingAdapter

    Permalink

    This actor's logging adapter.

    This actor's logging adapter.

    Definition Classes
    EventsourcedView
  50. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  53. final def onCommand: Receive

    Permalink

    Command handler.

    Command handler.

    Definition Classes
    AbstractEventsourcedComponent → EventsourcedView
  54. final def onEvent: Receive

    Permalink

    Event handler.

    Event handler.

    Definition Classes
    AbstractEventsourcedViewEventsourcedView
  55. final def onRecovery: Handler[Unit]

    Permalink

    Recovery completion handler.

    Recovery completion handler. If called with a Failure, the actor will be stopped in any case, regardless of the action taken by the returned handler. The default handler implementation does nothing and can be overridden by implementations.

    Definition Classes
    AbstractEventsourcedComponent → EventsourcedView
  56. final def onSnapshot: Receive

    Permalink

    Snapshot handler.

    Snapshot handler.

    Definition Classes
    AbstractEventsourcedComponent → EventsourcedView
  57. final def persist[A](event: A, customDestinationAggregateIds: Set[String], handler: ResultHandler[A]): Unit

    Permalink

    Java API of persist.

    Java API of persist.

    Calls the given handler with the persist result for the event.

    Multiple routing destinations can be defined with the customDestinationAggregateIds.

    See also

    EventsourcedActor

  58. final def persist[A](event: A, handler: ResultHandler[A]): Unit

    Permalink

    Java API of persist.

    Java API of persist.

    Calls the given handler with the persist result for the event.

    See also

    EventsourcedActor

  59. final def persist[A](event: A, customDestinationAggregateIds: Set[String] = Set())(handler: Handler[A]): Unit

    Permalink

    Asynchronously persists the given event and calls handler with the persist result.

    Asynchronously persists the given event and calls handler with the persist result. If persistence was successful, onEvent is called with the persisted event before handler is called. Both, onEvent and handler, are called on a dispatcher thread of this actor, hence, it is safe to modify internal state within them. The handler can also obtain a reference to the initial command sender via sender().

    By default, the event is routed to event-sourced destinations with an undefined aggregateId. If this actor's aggregateId is defined it is additionally routed to all actors with the same aggregateId. Further routing destinations can be defined with the customDestinationAggregateIds parameter.

    Definition Classes
    EventsourcedActor
  60. final def persistConfirmation[A](event: A, deliveryId: String, customDestinationAggregateIds: Set[String], handler: ResultHandler[A]): Unit

    Permalink

    Java API of persistConfirmation.

  61. final def persistConfirmation[A](event: A, deliveryId: String, handler: ResultHandler[A]): Unit

    Permalink

    Java API of persistConfirmation.

  62. final def persistConfirmation[A](event: A, deliveryId: String, customDestinationAggregateIds: Set[String] = Set())(handler: Handler[A]): Unit

    Permalink

    Same semantics as EventsourcedActor.persist plus additional storage of a deliveryId together with the persistent event.

    Same semantics as EventsourcedActor.persist plus additional storage of a deliveryId together with the persistent event.

    Definition Classes
    ConfirmedDelivery
  63. final def persistN[A](events: Iterable[A], onLast: ResultHandler[A], customDestinationAggregateIds: Set[String], handler: ResultHandler[A]): Unit

    Permalink

    Java API of persistN.

    Java API of persistN.

    Calls the given handler with the persist result for each event in the sequence.

    Accepts an onLast handler that will be called after persisting the last event of the sequence.

    Multiple routing destinations can be defined with the customDestinationAggregateIds.

    See also

    EventsourcedActor

  64. final def persistN[A](events: Iterable[A], customDestinationAggregateIds: Set[String], handler: ResultHandler[A]): Unit

    Permalink

    Java API of persistN.

    Java API of persistN.

    Calls the given handler with the persist result for each event in the sequence.

    Multiple routing destinations can be defined with the customDestinationAggregateIds.

    See also

    EventsourcedActor

  65. final def persistN[A](events: Iterable[A], onLast: ResultHandler[A], handler: ResultHandler[A]): Unit

    Permalink

    Java API of persistN.

    Java API of persistN.

    Calls the given handler with the persist result for each event in the sequence.

    Accepts an onLast handler that will be called after persisting the last event of the sequence.

    See also

    EventsourcedActor

  66. final def persistN[A](events: Iterable[A], handler: ResultHandler[A]): Unit

    Permalink

    Java API of persistN.

    Java API of persistN.

    Calls the given handler with the persist result for each event in the sequence.

    See also

    EventsourcedActor

  67. final def persistN[A](events: Seq[A], onLast: Handler[A] = (_: Try[A]) => (), customDestinationAggregateIds: Set[String] = Set())(handler: Handler[A]): Unit

    Permalink

    Asynchronously persists a sequence of events and calls handler with the persist result for each event in the sequence.

    Asynchronously persists a sequence of events and calls handler with the persist result for each event in the sequence. If persistence was successful, onEvent is called with a persisted event before handler is called. Both, onEvent and handler, are called on a dispatcher thread of this actor, hence, it is safe to modify internal state within them. The handler can also obtain a reference to the initial command sender via sender(). The onLast handler is additionally called for the last event in the sequence.

    By default, the event is routed to event-sourced destinations with an undefined aggregateId. If this actor's aggregateId is defined it is additionally routed to all actors with the same aggregateId. Further routing destinations can be defined with the customDestinationAggregateIds parameter.

    Definition Classes
    EventsourcedActor
  68. final def persistOnEvent[A](event: A, customDestinationAggregateIds: Set[String]): Unit

    Permalink

    Java API of persistOnEvent.

    Java API of persistOnEvent.

    Multiple routing destinations can be defined with the customDestinationAggregateIds.

    See also

    PersistOnEvent

  69. final def persistOnEvent[A](event: A): Unit

    Permalink

    Java API of persistOnEvent.

    Java API of persistOnEvent.

    See also

    PersistOnEvent

  70. final def persistOnEvent[A](event: A, customDestinationAggregateIds: Set[String] = Set()): Unit

    Permalink

    Asynchronously persists the given event.

    Asynchronously persists the given event. Applications that want to handle the persisted event should define the event handler at that event. By default, the event is routed to event-sourced destinations with an undefined aggregateId. If this actor's aggregateId is defined it is additionally routed to all actors with the same aggregateId. Further routing destinations can be defined with the customDestinationAggregateIds parameter.

    Definition Classes
    PersistOnEvent
  71. def postRestart(reason: Throwable): Unit

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

    Permalink

    Sets recovering to false before calling super.postStop.

    Sets recovering to false before calling super.postStop.

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

    Permalink

    Sets recovering to false before calling super.preRestart.

    Sets recovering to false before calling super.preRestart.

    Definition Classes
    EventsourcedView → UnrestrictedStash → Actor
  74. def preStart(): Unit

    Permalink

    Initiates recovery.

    Initiates recovery.

    Definition Classes
    EventsourcedView → Actor
  75. final def receive: Receive

    Permalink

    Initialization behavior.

    Initialization behavior.

    Definition Classes
    EventsourcedView → Actor
  76. final def receiveBuilder(): ReceiveBuilder

    Permalink

    Creates a new empty ReceiveBuilder.

    Creates a new empty ReceiveBuilder. Mimics AbstractActor.receiveBuilder.

    Definition Classes
    AbstractEventsourcedComponent
  77. final def recovering: Boolean

    Permalink

    Returns true if this actor is currently recovering internal state by consuming replayed events from the event log.

    Returns true if this actor is currently recovering internal state by consuming replayed events from the event log. Returns false after recovery completed and the actor switches to consuming live events.

    Definition Classes
    EventsourcedView
  78. def redeliverUnconfirmed(): Unit

    Permalink

    Redelivers all unconfirmed messages.

    Redelivers all unconfirmed messages.

    Definition Classes
    ConfirmedDelivery
  79. def replayBatchSize: Int

    Permalink

    Maximum number of events to be replayed to this actor before replaying is suspended.

    Maximum number of events to be replayed to this actor before replaying is suspended. A suspended replay is resumed automatically after all replayed events haven been handled by this actor's event handler (= backpressure). The default value for the maximum replay batch size is given by configuration item eventuate.log.replay-batch-size. Configured values can be overridden by overriding this method.

    Definition Classes
    EventsourcedView
  80. def replayFromSequenceNr: Option[Long]

    Permalink

    Override to provide an application-defined log sequence number from which event replay will start.

    Override to provide an application-defined log sequence number from which event replay will start.

    If Some(snr) is returned snapshot loading will be skipped and replay will start from the given sequence number snr.

    If None is returned the actor proceeds with the regular snapshot loading procedure.

    Definition Classes
    EventsourcedView
  81. def save(snapshot: Any, handler: ResultHandler[SnapshotMetadata]): Unit

    Permalink

    Java API of save.

    Java API of save.

    Must be supplied with a ResultHandler to process successful or failed results.

    Definition Classes
    AbstractEventsourcedComponent
    See also

    EventsourcedView

  82. final def save(snapshot: Any)(handler: Handler[SnapshotMetadata]): Unit

    Permalink

    Asynchronously saves the given snapshot and calls handler with the generated snapshot metadata.

    Asynchronously saves the given snapshot and calls handler with the generated snapshot metadata. The handler can obtain a reference to the initial message sender with sender().

    Definition Classes
    EventsourcedView
  83. implicit final val self: ActorRef

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

    Permalink
    Definition Classes
    Actor
  85. def snapshotContext: BehaviorContext

    Permalink

    Returns the snapshot BehaviorContext.

    Returns the snapshot BehaviorContext.

    Definition Classes
    EventsourcedView
  86. def stash(): Unit

    Permalink

    Adds the current command to the user's command stash.

    Adds the current command to the user's command stash. Must not be used in the event handler or persist handler.

    Definition Classes
    EventsourcedActorEventsourcedView → StashSupport
  87. def stateSync: Boolean

    Permalink

    State synchronization.

    State synchronization. If set to true, commands see internal state that is consistent with the event log. This is achieved by stashing new commands if this actor is currently writing events. If set to false, commands see internal state that is eventually consistent with the event log.

    Definition Classes
    EventsourcedActor
  88. def supervisorStrategy: SupervisorStrategy

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  91. def unconfirmed: Set[String]

    Permalink

    Delivery ids of unconfirmed messages.

    Delivery ids of unconfirmed messages.

    Definition Classes
    ConfirmedDelivery
  92. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Actor
  93. def unstashAll(): Unit

    Permalink

    Prepends all stashed commands to the actor's mailbox and then clears the command stash.

    Prepends all stashed commands to the actor's mailbox and then clears the command stash. Has no effect if the actor is recovering i.e. if recovering returns true.

    Definition Classes
    EventsourcedActorEventsourcedView → StashSupport
  94. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from PersistOnEvent

Inherited from ConfirmedDelivery

Inherited from EventsourcedActor

Inherited from AbstractEventsourcedView

Inherited from AbstractEventsourcedComponent

Inherited from ConditionalRequests

Inherited from EventsourcedVersion

Inherited from EventsourcedView

Inherited from Stash

Inherited from RequiresMessageQueue[DequeBasedMessageQueueSemantics]

Inherited from UnrestrictedStash

Inherited from StashSupport

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped