Class/Object

com.rbmhtechnology.eventuate.log.leveldb

LeveldbEventLog

Related Docs: object LeveldbEventLog | package leveldb

Permalink

class LeveldbEventLog extends EventLog[LeveldbEventLogState] with WithBatch

An event log actor with LevelDB as storage backend. The directory containing the LevelDB files for this event log is named after the constructor parameters using the template "prefix-id" and stored in a root directory defined by the log.leveldb.dir configuration.

Please note: prefix and id are currently not escaped when creating the directory name.

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

Instance Constructors

  1. new LeveldbEventLog(id: String, prefix: String)

    Permalink

    id

    unique log id.

    prefix

    prefix of the directory that contains the LevelDB files

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
    LeveldbEventLogEventLogSPI
  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 leveldb: DB

    Permalink
    Attributes
    protected
    Definition Classes
    LeveldbEventLog → WithBatch
  20. val leveldbWriteOptions: WriteOptions

    Permalink
    Attributes
    protected
    Definition Classes
    LeveldbEventLog → WithBatch
  21. def logDir: File

    Permalink
  22. val logger: LoggingAdapter

    Permalink

    This event log's logging adapter.

    This event log's logging adapter.

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    LeveldbEventLogEventLog → Actor
  30. 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
    LeveldbEventLogEventLogSPI
  31. 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
    LeveldbEventLogEventLogSPI
  32. 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
    LeveldbEventLogEventLogSPI
    See also

    ReplicationProtocol.GetReplicationProgress

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

    Permalink

    Asynchronously reads all stored local replication progresses.

    Asynchronously reads all stored local replication progresses.

    Definition Classes
    LeveldbEventLogEventLogSPI
    See also

    ReplicationProtocol.GetReplicationProgresses

  34. def receive: Receive

    Permalink
    Definition Classes
    EventLog → Actor
  35. def recoverState: Future[LeveldbEventLogState]

    Permalink

    Asynchronously recovers event log state from the storage backend.

    Asynchronously recovers event log state from the storage backend.

    Definition Classes
    LeveldbEventLogEventLogSPI
  36. def recoverStateFailure(cause: Throwable): Unit

    Permalink

    Called after failed event log state recovery.

    Called after failed event log state recovery.

    Definition Classes
    EventLogSPI
  37. def recoverStateSuccess(state: LeveldbEventLogState): Unit

    Permalink

    Called after successful event log state recovery.

    Called after successful event log state recovery.

    Definition Classes
    EventLogSPI
  38. 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
    LeveldbEventLogEventLogSPI
  39. implicit final val self: ActorRef

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

    Permalink
    Definition Classes
    Actor
  41. object services

    Permalink

    Service context for asynchronous read operations.

    Service context for asynchronous read operations.

    Definition Classes
    EventLog
  42. val settings: LeveldbEventLogSettings

    Permalink

    Event log settings.

    Event log settings.

    Definition Classes
    LeveldbEventLogEventLogSPI
  43. def stash(): Unit

    Permalink
    Definition Classes
    StashSupport
  44. def supervisorStrategy: SupervisorStrategy

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  52. def withBatch[R](body: (WriteBatch) ⇒ R): R

    Permalink
    Attributes
    protected
    Definition Classes
    WithBatch
  53. 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
    LeveldbEventLogEventLogSPI
    See also

    EventLogSettings

  54. 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
    LeveldbEventLogEventLogSPI
  55. 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
    LeveldbEventLogEventLogSPI
  56. 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
    LeveldbEventLogEventLogSPI

Inherited from WithBatch

Inherited from EventLog[LeveldbEventLogState]

Inherited from Stash

Inherited from RequiresMessageQueue[DequeBasedMessageQueueSemantics]

Inherited from UnrestrictedStash

Inherited from StashSupport

Inherited from Actor

Inherited from AnyRef

Inherited from Any

Ungrouped