com.rbmhtechnology

eventuate

package eventuate

Visibility
  1. Public
  2. All

Type Members

  1. abstract class AbstractEventsourcedActor extends AbstractEventsourcedView with EventsourcedActor with ConfirmedDelivery

    Java API.

    Java API.

    See also

    EventsourcedActor

  2. abstract class AbstractEventsourcedView extends EventsourcedView

    Java API.

    Java API.

    See also

    EventsourcedView

  3. trait ConcurrentVersions[A, B] extends Serializable

    Tracks concurrent Versioned values which arise from concurrent updates.

    Tracks concurrent Versioned values which arise from concurrent updates.

    A

    Versioned value type

    B

    Update type

  4. class ConcurrentVersionsList[A] extends ConcurrentVersions[A, A]

    A ConcurrentVersions implementation that shall be used if updates replace current versioned values (= full updates).

    A ConcurrentVersions implementation that shall be used if updates replace current versioned values (= full updates). ConcurrentVersionsList is an immutable data structure.

  5. class ConcurrentVersionsTree[A, B] extends ConcurrentVersions[A, B]

    A ConcurrentVersions implementation that shall be used if updates are incremental.

    A ConcurrentVersions implementation that shall be used if updates are incremental. ConcurrentVersionsTree is a mutable data structure. Therefore, it is recommended not to share instances of ConcurrentVersionsTree directly but rather the Versioned sequence returned by ConcurrentVersionsTree#all. Later releases will be based on an immutable data structure.

    Please note: This implementation does not purge old versions at the moment (which shouldn't be a problem if the number of incremental updates to a versioned aggregate is rather small). In later releases, manual and automated purging of old versions will be supported.

  6. case class ConditionalCommand(condition: VectorTime, cmd: Any) extends Product with Serializable

    A conditional command is a command to an EventsourcedActor or EventsourcedView whose delivery to the actor's command handler is delayed until the following condition is met: the merge result of all timestamps of events, that have been previously handled by that actor, must be >= the given condition timestamp.

    A conditional command is a command to an EventsourcedActor or EventsourcedView whose delivery to the actor's command handler is delayed until the following condition is met: the merge result of all timestamps of events, that have been previously handled by that actor, must be >= the given condition timestamp.

    For example, this condition is met by an EventsourcedActor or EventsourcedView if the condition timestamp is the vector timestamp of an event and that event has been handled by the actor.

  7. trait ConfirmedDelivery extends EventsourcedActor

    Supports the reliable delivery of messages to destinations by enabling applications to redeliver messages until they are confirmed by their destinations.

    Supports the reliable delivery of messages to destinations by enabling applications to redeliver messages until they are confirmed by their destinations. Both, message delivery and confirmation must be executed within an EventsourcedActor's event handler. New messages are delivered by calling deliver. When the destination replies with a confirmation message, the EventsourcedActor must generate an event for which the handler calls confirm. Until confirmation, delivered messages are tracked as unconfirmed messages. Unconfirmed messages can be redelivered by calling redeliverUnconfirmed. This is usually done within a command handler by processing scheduler messages. Redelivery occurs automatically when the EventsourcedActor successfully recovered after initial start or a re-start.

  8. case class DurableEvent(payload: Any, systemTimestamp: Long, vectorTimestamp: VectorTime, emitterId: String, emitterAggregateId: Option[String] = None, customDestinationAggregateIds: Set[String] = Set(), sourceLogReadPosition: Long = 0L, sourceLogId: String = UndefinedLogId, targetLogId: String = UndefinedLogId, sourceLogSequenceNr: Long = UndefinedSequenceNr, targetLogSequenceNr: Long = UndefinedSequenceNr) extends Product with Serializable

    Provider API.

    Provider API.

    Event storage format.

    payload

    Custom, application-defined event.

    systemTimestamp

    Wall-clock timestamp, generated by emitter (EventsourcedActor).

    vectorTimestamp

    Vector timestamp, generated by emitter (EventsourcedActor).

    emitterId

    Id of emitter (EventsourcedActor).

    emitterAggregateId

    Aggregate id of emitter (EventsourcedActor). This is also the default routing destination of this event. If defined, the event is routed to event-sourced actors or views with a matching aggregateId. In any case, the event is routed to event-sourced actors and views with an undefined aggregateId.

    customDestinationAggregateIds

    Aggregate ids of additional, custom routing destinations. If non-empty, the event is additionally routed to event-sourced actors and views with a matching aggregateId.

    sourceLogReadPosition

    Highest source log read position from last replication.

    sourceLogId

    Source log id from last replication. Equal to targetLogId if not replicated yet.

    targetLogId

    Target log id from last replication.

    sourceLogSequenceNr

    Source log sequence number from last replication.

    targetLogSequenceNr

    Target log sequence number.

  9. trait EventsourcedActor extends EventsourcedView

    An EventsourcedActor is an EventsourcedView that can also produce (= emit) new events to its event log.

    An EventsourcedActor is an EventsourcedView that can also produce (= emit) new events to its event log. New events can be produced with methods persist, persistN and persistWithLocalTime. They must only be used within the onCommand command handler. The command handler may only read internal state but must not modify it. Internal state may only be modified within onEvent.

    An EventsourcedActor maintains a VectorClock used to time-stamp the events it emits to the event log. Events that are handled by its event handler update the vector clock. Events that are pushed from the eventLog actor but not handled by onEvent do not update the vector clock.

    See also

    EventsourcedView

  10. trait EventsourcedView extends Actor with ConditionalCommands with InternalStash with ActorLogging

    An actor that derives internal state from events stored in an event log.

    An actor that derives internal state from events stored in an event log. Events are pushed from the eventLog actor to this actor and handled with the onEvent event handler. An event handler defines how internal state is updated from events.

    An EventsourcedView can also store snapshots of internal state with its save method. During (re-)start the latest snapshot saved by this actor (if any) is passed as argument to the onSnapshot handler, if the handler is defined at that snapshot. If the onSnapshot handler is not defined at that snapshot or is not overridden at all, event replay starts from scratch. Newer events that are not covered by the snapshot are handled by onEvent after onSnapshot returns.

    By default, an EventsourcedView does not define an aggregateId. In this case, the eventLog pushes all events to this actor. If it defines an aggregateId, the eventLog actor only pushes those events that contain that aggregateId value in their routingDestinations set.

    An EventsourcedView can only consume events from its eventLog but cannot produce new events. Commands sent to an EventsourcedView during recovery are delayed until recovery completes.

    See also

    DurableEvent

    EventsourcedActor

  11. case class ReplicationConnection(host: String, port: Int, name: String = ..., filters: Map[String, ReplicationFilter] = Map.empty) extends Product with Serializable

    A replication connection descriptor.

    A replication connection descriptor.

    host

    Host of the remote actor system that runs a ReplicationEndpoint.

    port

    Port of the remote actor system that runs a ReplicationEndpoint.

    name

    Name of the remote actor system that runs a ReplicationEndpoint.

    filters

    Replication filters applied remotely. Filters are applied to individual event logs where filter keys are the corresponding event log names.

  12. class ReplicationEndpoint extends AnyRef

    A replication endpoint connects to other replication endpoints for replicating events.

    A replication endpoint connects to other replication endpoints for replicating events. Events are replicated from the connected endpoints to this endpoint. The connected endpoints are replication sources, this endpoint is a replication target. To setup bi-directional replication, the other replication endpoints must additionally setup replication connections to this endpoint.

    A replication endpoint manages one or more event logs. Event logs are indexed by name. Events are replicated only between event logs with matching names.

  13. trait ReplicationFilter extends Serializable

    Serializable and composable replication filter.

  14. case class Snapshot(metadata: SnapshotMetadata, deliveryAttempts: Vector[DeliveryAttempt] = Vector.empty, payload: Any) extends Product with Serializable

    Represents a snapshot of internal state of an EventsourcedActor or EventsourcedView.

    Represents a snapshot of internal state of an EventsourcedActor or EventsourcedView.

    metadata

    Snapshot metadata.

    deliveryAttempts

    Unconfirmed delivery attempts of an EventsourcedActor that implements ConfirmedDelivery.

    payload

    The actual user-defined snapshot passed as argument to EventsourcedActor#save or EventsourcedView#save.

  15. case class SnapshotMetadata(emitterId: String, sequenceNr: Long, systemTimestamp: Long, vectorTimestamp: VectorTime) extends Product with Serializable

    Snapshot metadata.

    Snapshot metadata.

    emitterId

    Id of the EventsourcedActor or EventsourcedView that saves the snapshot.

    sequenceNr

    The latest event sequence number covered by the snapshot.

    systemTimestamp

    The latest event system timestamp covered by the snapshot.

    vectorTimestamp

    The latest event vector timestamp covered by the snapshot.

    See also

    EventsourcedView#lastVectorTimestamp

    EventsourcedView#lastSystemTimestamp

    EventsourcedView#lastSequenceNr

  16. case class VectorClock(processId: String, currentTime: VectorTime = VectorTime()) extends Product with Serializable

    An immutable vector clock.

    An immutable vector clock.

    processId

    Id of the owner process.

    currentTime

    The clock's current time.

  17. case class VectorTime(value: Map[String, Long] = Map.empty) extends Product with Serializable

    Vector time, represented as process id -> logical time map.

  18. case class Versioned[A](value: A, updateTimestamp: VectorTime, creator: String = "") extends Product with Serializable

    A versioned value.

    A versioned value.

    value

    The value.

    updateTimestamp

    Timestamp of the event that caused this version.

    creator

    Creator of the event that caused this version.

  19. case class VersionedAggregate[S, C, E](id: String, cmdHandler: (S, C) ⇒ Try[E], evtHandler: (S, E) ⇒ S, aggregate: Option[ConcurrentVersions[S, E]] = None)(implicit evidence$1: DomainCmd[C], evidence$2: DomainEvt[E]) extends Product with Serializable

    Manages concurrent versions of an event-sourced aggregate.

    Manages concurrent versions of an event-sourced aggregate.

    S

    Aggregate type.

    C

    Command type.

    E

    Event type.

    id

    Aggregate id

    cmdHandler

    Command handler

    evtHandler

    Event handler

    aggregate

    Aggregate.

Value Members

  1. object ConcurrentVersions extends Serializable

  2. object ConcurrentVersionsList extends Product with Serializable

  3. object ConcurrentVersionsTree extends Serializable

  4. object ConfirmedDelivery

  5. object DurableEvent extends Serializable

  6. object EventsourcingProtocol

  7. object ReplicationConnection extends Serializable

  8. object ReplicationEndpoint

  9. object ReplicationFilter extends Serializable

  10. object ReplicationProtocol

  11. object VectorTime extends Serializable

  12. object VersionedAggregate extends Serializable

  13. package crdt

  14. package log

  15. package serializer

  16. package snapshot

Ungrouped