Class/Object

com.rbmhtechnology.eventuate.log.cassandra

CassandraEventLog

Related Docs: object CassandraEventLog | package cassandra

Permalink

class CassandraEventLog extends EventLog[CassandraEventLogState]

An event log actor with Apache Cassandra as storage backend. It uses the Cassandra extension to connect to a Cassandra cluster. Applications should create an instance of this actor using the props method of the CassandraEventLog companion object.

val factory: ActorRefFactory = ... // ActorSystem or ActorContext
val logId: String = "example"      // Unique log id

val log = factory.actorOf(CassandraEventLog.props(logId))

Each event log actor creates two tables in the configured keyspace (see also Cassandra). Assuming the following table prefix

eventuate.log.cassandra.table-prefix = "log"

and a log id with value example, the names of these two tables are

See also

DurableEvent

Cassandra

Linear Supertypes
EventLog[CassandraEventLogState], Stash, RequiresMessageQueue[DequeBasedMessageQueueSemantics], UnrestrictedStash, StashSupport, EventLogSPI[CassandraEventLogState], Actor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CassandraEventLog
  2. EventLog
  3. Stash
  4. RequiresMessageQueue
  5. UnrestrictedStash
  6. StashSupport
  7. EventLogSPI
  8. Actor
  9. AnyRef
  10. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CassandraEventLog(id: String, aggregateIndexing: Boolean)

    Permalink

    id

    unique log id.

    aggregateIndexing

    true if the event log shall process aggregate indexing (recommended). Turn this off only if you don't use aggregate IDs on this event log!

Type Members

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

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

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

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

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

    Permalink
    Attributes
    protected[akka]
    Definition Classes
    Actor
  9. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. implicit val context: ActorContext

    Permalink
    Definition Classes
    Actor
  12. def delete(toSequenceNr: Long): Future[Long]

    Permalink

    Instructs the log to asynchronously and physically delete events up to toSequenceNr.

    Instructs the log to asynchronously and physically delete events up to toSequenceNr. This operation completes when physical deletion completed and returns the sequence nr up to which events have been deleted. This can be smaller then the requested toSequenceNr if a backend has to keep events for internal reasons. A backend that does not support physical deletion should not override this method.

    Definition Classes
    EventLogSPI
  13. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  18. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  19. val logger: LoggingAdapter

    Permalink

    This event log's logging adapter.

    This event log's logging adapter.

    Definition Classes
    EventLog
  20. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  23. def postRestart(reason: Throwable): Unit

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

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

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

    Permalink
    Definition Classes
    EventLog → Actor
  27. def read(fromSequenceNr: Long, toSequenceNr: Long, max: Int, aggregateId: String): Future[BatchReadResult]

    Permalink

    Asynchronously batch-reads events whose destinationAggregateIds contains the given aggregateId.

    Asynchronously batch-reads events whose destinationAggregateIds contains the given aggregateId. At most max events must be returned that are within the sequence number bounds fromSequenceNr and toSequenceNr.

    fromSequenceNr

    sequence number to start reading (inclusive).

    toSequenceNr

    sequence number to stop reading (inclusive) or earlier if max events have already been read.

    Definition Classes
    CassandraEventLogEventLogSPI
  28. def read(fromSequenceNr: Long, toSequenceNr: Long, max: Int): Future[BatchReadResult]

    Permalink

    Asynchronously batch-reads events from the raw event log.

    Asynchronously batch-reads events from the raw event log. At most max events must be returned that are within the sequence number bounds fromSequenceNr and toSequenceNr.

    fromSequenceNr

    sequence number to start reading (inclusive).

    toSequenceNr

    sequence number to stop reading (inclusive) or earlier if max events have already been read.

    Definition Classes
    CassandraEventLogEventLogSPI
  29. def readReplicationProgress(logId: String): Future[Long]

    Permalink

    Asynchronously reads the replication progress for given source logId.

    Asynchronously reads the replication progress for given source logId.

    Definition Classes
    CassandraEventLogEventLogSPI
    See also

    ReplicationProtocol.GetReplicationProgress

  30. def readReplicationProgresses: Future[Map[String, Long]]

    Permalink

    Asynchronously reads all stored local replication progresses.

    Asynchronously reads all stored local replication progresses.

    Definition Classes
    CassandraEventLogEventLogSPI
    See also

    ReplicationProtocol.GetReplicationProgresses

  31. def receive: Receive

    Permalink
    Definition Classes
    EventLog → Actor
  32. def recoverState: Future[CassandraEventLogState]

    Permalink

    Asynchronously recovers event log state from the storage backend.

    Asynchronously recovers event log state from the storage backend.

    Definition Classes
    CassandraEventLogEventLogSPI
  33. def recoverStateFailure(cause: Throwable): Unit

    Permalink

    Called after failed event log state recovery.

    Called after failed event log state recovery.

    Definition Classes
    EventLogSPI
  34. def recoverStateSuccess(state: CassandraEventLogState): Unit

    Permalink

    Called after successful event log state recovery.

    Called after successful event log state recovery.

    Definition Classes
    CassandraEventLogEventLogSPI
  35. def replicationRead(fromSequenceNr: Long, toSequenceNr: Long, max: Int, scanLimit: Int, filter: (DurableEvent) ⇒ Boolean): Future[BatchReadResult]

    Permalink

    Asynchronously batch-reads events from the raw event log.

    Asynchronously batch-reads events from the raw event log. At most max events must be returned that are within the sequence number bounds fromSequenceNr and toSequenceNr and that pass the given filter.

    fromSequenceNr

    sequence number to start reading (inclusive).

    toSequenceNr

    sequence number to stop reading (inclusive) or earlier if max events have already been read.

    Definition Classes
    CassandraEventLogEventLogSPI
  36. implicit final val self: ActorRef

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

    Permalink
    Definition Classes
    Actor
  38. object services

    Permalink

    Service context for asynchronous read operations.

    Service context for asynchronous read operations.

    Definition Classes
    EventLog
  39. val settings: CassandraEventLogSettings

    Permalink

    Event log settings.

    Event log settings.

    Definition Classes
    CassandraEventLogEventLogSPI
  40. def stash(): Unit

    Permalink
    Definition Classes
    StashSupport
  41. def supervisorStrategy: SupervisorStrategy

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

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

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

    Permalink
    Definition Classes
    CassandraEventLog → Actor
  45. def unstashAll(): Unit

    Permalink
    Definition Classes
    StashSupport
  46. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  49. def write(events: Seq[DurableEvent], partition: Long, clock: EventLogClock): Unit

    Permalink

    Synchronously writes events to the given partition.

    Synchronously writes events to the given partition. The partition is calculated from the configured partitionSizeMax and the current sequence number. Asynchronous writes will be supported in future versions.

    This method may only throw an exception if it can guarantee that events have not been written to the storage backend. If this is not the case (e.g. after a timeout communicating with a remote storage backend) this method must retry writing or give up by stopping the actor with context.stop(self). This is necessary to avoid that events are erroneously excluded from the event stream sent to event-sourced actors, views, writers and processors, as they may later re-appear during recovery which would violate ordering/causality guarantees.

    Implementations that potentially retry a write for a longer time should use a CircuitBreaker for protecting themselves against request overload.

    Definition Classes
    CassandraEventLogEventLogSPI
    See also

    EventLogSettings

  50. def writeDeletionMetadata(deleteMetadata: DeletionMetadata): Unit

    Permalink

    Synchronously writes metadata for a Delete request.

    Synchronously writes metadata for a Delete request. This marks events up to DeletionMetadata.toSequenceNr as deleted, i.e. they are not read on replay and indicates which remote logs must have replicated these events before they are allowed to be physically deleted locally.

    Definition Classes
    CassandraEventLogEventLogSPI
  51. def writeEventLogClockSnapshot(clock: EventLogClock): Future[Unit]

    Permalink

    Asynchronously writes the current snapshot of the event log clock

    Asynchronously writes the current snapshot of the event log clock

    Definition Classes
    CassandraEventLogEventLogSPI
  52. def writeReplicationProgresses(progresses: Map[String, Long]): Future[Unit]

    Permalink

    Asynchronously writes the replication progresses for source log ids given by progresses keys.

    Asynchronously writes the replication progresses for source log ids given by progresses keys.

    Definition Classes
    CassandraEventLogEventLogSPI

Inherited from Stash

Inherited from RequiresMessageQueue[DequeBasedMessageQueueSemantics]

Inherited from UnrestrictedStash

Inherited from StashSupport

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped