Class

com.rbmhtechnology.eventuate

AbstractEventsourcedWriter

Related Doc: package eventuate

Permalink

abstract class AbstractEventsourcedWriter[R, W] extends AbstractEventsourcedView with EventsourcedWriter[R, W] with EventsourcedWriterFailureHandlerAdapter with EventsourcedWriterSuccessHandlerAdapter[R, W]

Java API for actors that implement EventsourcedWriter.

See also

EventsourcedWriter

AbstractEventsourcedView for a detailed usage of the Java API

Linear Supertypes
EventsourcedWriterSuccessHandlerAdapter[R, W], EventsourcedWriterFailureHandlerAdapter, EventsourcedWriter[R, W], EventsourcedWriterFailureHandlers, EventsourcedWriterSuccessHandlers[R, W], AbstractEventsourcedView, ConditionalRequests, EventsourcedVersion, EventsourcedView, Stash, RequiresMessageQueue[DequeBasedMessageQueueSemantics], UnrestrictedStash, StashSupport, Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AbstractEventsourcedWriter
  2. EventsourcedWriterSuccessHandlerAdapter
  3. EventsourcedWriterFailureHandlerAdapter
  4. EventsourcedWriter
  5. EventsourcedWriterFailureHandlers
  6. EventsourcedWriterSuccessHandlers
  7. AbstractEventsourcedView
  8. ConditionalRequests
  9. EventsourcedVersion
  10. EventsourcedView
  11. Stash
  12. RequiresMessageQueue
  13. UnrestrictedStash
  14. StashSupport
  15. Actor
  16. AnyRef
  17. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AbstractEventsourcedWriter(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

Abstract Value Members

  1. abstract def onRead(): CompletionStage[R]

    Permalink

    Java API of read.

    Java API of read.

    See also

    EventsourcedWriter

  2. abstract def onWrite(): CompletionStage[W]

    Permalink

    Java API of write.

    Java API of write.

    See also

    EventsourcedWriter

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 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
    AbstractEventsourcedViewEventsourcedView
  5. def aroundPostRestart(reason: Throwable): Unit

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

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

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

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

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  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. final def eq(arg0: AnyRef): Boolean

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

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

    Permalink

    Returns the event BehaviorContext.

    Returns the event BehaviorContext.

    Definition Classes
    EventsourcedView
  17. val eventLog: ActorRef

    Permalink

    Event log actor.

    Event log actor.

    Definition Classes
    AbstractEventsourcedViewEventsourcedView
  18. def finalize(): Unit

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

    Permalink

    Java API of aggregateId.

    Java API of aggregateId.

    Definition Classes
    AbstractEventsourcedView
    See also

    EventsourcedView

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

    Permalink
    Definition Classes
    AnyRef → Any
  21. final def getLastEmitterAggregateId: Optional[String]

    Permalink

    Java API of lastEmitterAggregateId.

  22. def hashCode(): Int

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

    Permalink

    Global unique actor id.

    Global unique actor id.

    Definition Classes
    AbstractEventsourcedViewEventsourcedView
  24. val instanceId: Int

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

    Permalink
    Definition Classes
    Any
  26. 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
  27. final def lastEmitterId: String

    Permalink

    Emitter id of the last handled event.

    Emitter id of the last handled event.

    Definition Classes
    EventsourcedView
  28. 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
  29. final def lastSequenceNr: Long

    Permalink

    Sequence number of the last handled event.

    Sequence number of the last handled event.

    Definition Classes
    EventsourcedView
  30. final def lastSystemTimestamp: Long

    Permalink

    Wall-clock timestamp of the last handled event.

    Wall-clock timestamp of the last handled event.

    Definition Classes
    EventsourcedView
  31. final def lastVectorTimestamp: VectorTime

    Permalink

    Vector timestamp of the last handled event.

    Vector timestamp of the last handled event.

    Definition Classes
    EventsourcedView
  32. val logger: LoggingAdapter

    Permalink

    This actor's logging adapter.

    This actor's logging adapter.

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

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

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

    Permalink
    Definition Classes
    AnyRef
  36. def onCommand: Receive

    Permalink

    Java API of the command handler.

    Java API of the command handler.

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

    Takes precedence over setOnCommand.

    Definition Classes
    AbstractEventsourcedViewEventsourcedView
    See also

    EventsourcedView

  37. def onEvent: Receive

    Permalink

    Java API of the event handler.

    Java API of the event handler.

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

    Takes precedence over setOnEvent.

    Definition Classes
    AbstractEventsourcedViewEventsourcedView
    See also

    EventsourcedView

  38. def onReadFailure(cause: Throwable): Unit

    Permalink

    Java API of readFailure.

    Java API of readFailure.

    Definition Classes
    EventsourcedWriterFailureHandlerAdapter
    See also

    EventsourcedWriter

  39. def onReadSuccess(result: R): Optional[Long]

    Permalink

    Java API of readSuccess.

    Java API of readSuccess.

    Definition Classes
    EventsourcedWriterSuccessHandlerAdapter
    See also

    EventsourcedWriter

  40. def onRecover: 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.

    Takes precedence over setOnRecover.

    Definition Classes
    AbstractEventsourcedView
    See also

    EventsourcedView

  41. 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
    AbstractEventsourcedViewEventsourcedView
  42. def onSnapshot: Receive

    Permalink

    Java API of the snapshot handler.

    Java API of the snapshot handler.

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

    Takes precedence over setOnSnapshot.

    Definition Classes
    AbstractEventsourcedViewEventsourcedView
    See also

    EventsourcedView

  43. def onWriteFailure(cause: Throwable): Unit

    Permalink

    Java API of writeFailure.

    Java API of writeFailure.

    Definition Classes
    EventsourcedWriterFailureHandlerAdapter
    See also

    EventsourcedWriter

  44. def onWriteSuccess(result: W): Unit

    Permalink

    Java API of writeSuccess.

    Java API of writeSuccess.

    Definition Classes
    EventsourcedWriterSuccessHandlerAdapter
    See also

    EventsourcedWriter

  45. def postRestart(reason: Throwable): Unit

    Permalink
    Definition Classes
    Actor
    Annotations
    @throws( classOf[java.lang.Exception] )
  46. 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
  47. 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
  48. def preStart(): Unit

    Permalink

    Initiates recovery.

    Initiates recovery.

    Definition Classes
    EventsourcedView → Actor
  49. def read(): Future[R]

    Permalink

    Asynchronously reads an initial value from the target database, usually to obtain information about event processing progress.

    Asynchronously reads an initial value from the target database, usually to obtain information about event processing progress. This method is called during initialization.

    Definition Classes
    AbstractEventsourcedWriterEventsourcedWriter
  50. final def readFailure(cause: Throwable): Unit

    Permalink
    Definition Classes
    EventsourcedWriterFailureHandlerAdapter → EventsourcedWriterFailureHandlers
  51. final def readSuccess(result: R): Option[Long]

    Permalink
    Definition Classes
    EventsourcedWriterSuccessHandlerAdapter → EventsourcedWriterSuccessHandlers
  52. final def receive: Receive

    Permalink

    Initialization behavior.

    Initialization behavior.

    Definition Classes
    EventsourcedView → Actor
  53. 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
  54. 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
  55. final def replayFromSequenceNr: Option[Long]

    Permalink

    Disallow for EventsourcedWriter and subclasses as event processing progress is determined by read and readSuccess.

    Disallow for EventsourcedWriter and subclasses as event processing progress is determined by read and readSuccess.

    Definition Classes
    EventsourcedWriterEventsourcedView
  56. 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
    AbstractEventsourcedView
    See also

    EventsourcedView

  57. 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
  58. implicit final val self: ActorRef

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

    Permalink
    Definition Classes
    Actor
  60. final def setOnCommand(handler: Receive): Unit

    Permalink

    Java API that sets this actor's command handler.

    Java API that sets this actor's command handler.

    Supplied with a partial function that defines the actor's command handling behaviour. Use ReceiveBuilder to define the behaviour.

    If onCommand is implemented, the supplied behaviour is ignored.

    handler

    a function that defines this actor's command handling behaviour.

    Attributes
    protected
    Definition Classes
    AbstractEventsourcedView
    See also

    EventsourcedView

  61. final def setOnEvent(handler: Receive): Unit

    Permalink

    Java API that sets this actor's event handler.

    Java API that sets this actor's event handler.

    Supplied with a partial function that defines the actor's event handling behaviour. Use ReceiveBuilder to define the behaviour.

    If onEvent is implemented, the supplied behaviour is ignored.

    handler

    a function that defines this actor's event handling behaviour.

    Attributes
    protected
    Definition Classes
    AbstractEventsourcedView
    See also

    EventsourcedView

  62. final def setOnRecover(handler: ResultHandler[Unit]): Unit

    Permalink

    Java API that sets this actor's recovery handler.

    Java API that sets this actor's recovery handler.

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

    If onRecover is implemented, the supplied behaviour is ignored.

    handler

    a ResultHandler that defines this actor's recover handling behaviour.

    Attributes
    protected
    Definition Classes
    AbstractEventsourcedView
    See also

    EventsourcedView

  63. final def setOnSnapshot(handler: Receive): Unit

    Permalink

    Java API that sets this actor's snapshot handler.

    Java API that sets this actor's snapshot handler.

    Supplied with a partial function that defines the actor's snapshot handling behaviour. Use ReceiveBuilder to define the behaviour.

    If onSnapshot is implemented, the supplied behaviour is ignored.

    handler

    a function that defines this actor's snapshot handling behaviour.

    Attributes
    protected
    Definition Classes
    AbstractEventsourcedView
    See also

    EventsourcedView

  64. def snapshotContext: BehaviorContext

    Permalink

    Returns the snapshot BehaviorContext.

    Returns the snapshot BehaviorContext.

    Definition Classes
    EventsourcedView
  65. 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.

    Definition Classes
    EventsourcedView → StashSupport
  66. def supervisorStrategy: SupervisorStrategy

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  69. def unhandled(message: Any): Unit

    Permalink
    Definition Classes
    Actor
  70. 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
    EventsourcedView → StashSupport
  71. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  74. def write(): Future[W]

    Permalink

    Asynchronously writes an incremental update to the target database.

    Asynchronously writes an incremental update to the target database. Incremental updates are prepared during event processing by a concrete onEvent handler.

    During event replay, this method is called latest after having replayed eventuate.log.replay-batch-size events and immediately after replay completes. During live processing, write is called immediately if no write operation is in progress and an event has been handled by onEvent. If a write operation is in progress, further event handling may run concurrently to that operation. If events are handled while a write operation is in progress, another write will follow immediately after the previous write operation completes.

    Definition Classes
    AbstractEventsourcedWriterEventsourcedWriter
  75. final def writeFailure(cause: Throwable): Unit

    Permalink
    Definition Classes
    EventsourcedWriterFailureHandlerAdapter → EventsourcedWriterFailureHandlers
  76. final def writeSuccess(result: W): Unit

    Permalink
    Definition Classes
    EventsourcedWriterSuccessHandlerAdapter → EventsourcedWriterSuccessHandlers

Inherited from EventsourcedWriterSuccessHandlerAdapter[R, W]

Inherited from EventsourcedWriterFailureHandlerAdapter

Inherited from EventsourcedWriter[R, W]

Inherited from EventsourcedWriterFailureHandlers

Inherited from EventsourcedWriterSuccessHandlers[R, W]

Inherited from AbstractEventsourcedView

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