org.eligosource.eventsourced.journal.leveldb

LeveldbJournalProps

case class LeveldbJournalProps(dir: File, name: Option[String] = scala.None, dispatcherName: Option[String] = scala.None, fsync: Boolean = false, checksum: Boolean = false, native: Boolean = true, processorStructured: Boolean = true, snapshotDir: Path = ..., snapshotSerializer: SnapshotSerializer = ..., snapshotLoadTimeout: FiniteDuration = ..., snapshotSaveTimeout: FiniteDuration = ..., snapshotFilesystem: FileSystem = ..., readOnly: Boolean = false) extends JournalProps with HadoopFilesystemSnapshottingProps[LeveldbJournalProps] with Product with Serializable

Configuration object for a LevelDB based journal. Applications may also choose to use a Java port of LevelDB that doesn't run native code (see native field). This journal comes with different optimizations to choose from, as described at the methods

Journal actors can be created from a configuration object as follows:

import java.io.File

import akka.actor._

import org.eligosource.eventsourced.core.Journal
import org.eligosource.eventsourced.journal.leveldb.LeveldbJournalProps

implicit val system: ActorSystem = ...

val journalDir: File = ...
val journal: ActorRef = Journal(LeveldbJournalProps(journalDir))
dir

Journal directory.

name

Optional journal actor name.

dispatcherName

Optional journal actor dispatcher name.

fsync

true if every write is physically synced. Default is false.

checksum

true if checksums are verified on read. Default is false.

native

true if the native LevelDB should be used (default), false for using a Java port.

processorStructured

true if entries are primarily ordered by processor id, false if entries are ordered by sequence number. Default is true.

Linear Supertypes
Serializable, Serializable, Product, Equals, HadoopFilesystemSnapshottingProps[LeveldbJournalProps], JournalProps, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. LeveldbJournalProps
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. HadoopFilesystemSnapshottingProps
  7. JournalProps
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new LeveldbJournalProps(dir: File, name: Option[String] = scala.None, dispatcherName: Option[String] = scala.None, fsync: Boolean = false, checksum: Boolean = false, native: Boolean = true, processorStructured: Boolean = true, snapshotDir: Path = ..., snapshotSerializer: SnapshotSerializer = ..., snapshotLoadTimeout: FiniteDuration = ..., snapshotSaveTimeout: FiniteDuration = ..., snapshotFilesystem: FileSystem = ..., readOnly: Boolean = false)

    dir

    Journal directory.

    name

    Optional journal actor name.

    dispatcherName

    Optional journal actor dispatcher name.

    fsync

    true if every write is physically synced. Default is false.

    checksum

    true if checksums are verified on read. Default is false.

    native

    true if the native LevelDB should be used (default), false for using a Java port.

    processorStructured

    true if entries are primarily ordered by processor id, false if entries are ordered by sequence number. Default is true.

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. val checksum: Boolean

    true if checksums are verified on read.

    true if checksums are verified on read. Default is false.

  8. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  9. def createJournal(implicit actorRefFactory: ActorRefFactory): ActorRef

    Creates and starts a new journal using the settings of this configuration object.

    Creates and starts a new journal using the settings of this configuration object.

    Definition Classes
    JournalProps
  10. def createJournalActor: Actor

    Creates a journal actor instance.

    Creates a journal actor instance.

    Definition Classes
    LeveldbJournalPropsJournalProps
  11. val dir: File

    Journal directory.

  12. val dispatcherName: Option[String]

    Optional journal actor dispatcher name.

    Optional journal actor dispatcher name.

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

    Definition Classes
    AnyRef
  14. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  15. val fsync: Boolean

    true if every write is physically synced.

    true if every write is physically synced. Default is false.

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

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

    Definition Classes
    Any
  18. val name: Option[String]

    Optional journal actor name.

    Optional journal actor name.

    Definition Classes
    LeveldbJournalPropsJournalProps
  19. val native: Boolean

    true if the native LevelDB should be used (default), false for using a Java port.

  20. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  23. val processorStructured: Boolean

    true if entries are primarily ordered by processor id, false if entries are ordered by sequence number.

    true if entries are primarily ordered by processor id, false if entries are ordered by sequence number. Default is true.

  24. val readOnly: Boolean

    Make journal read only (e.

    Make journal read only (e.g. offline snapshot)

    Definition Classes
    LeveldbJournalPropsJournalProps
  25. def sequenceStructured: Boolean

    Returns false if entries are primarily ordered by processor id, true if entries are ordered by sequence number.

    Returns false if entries are primarily ordered by processor id, true if entries are ordered by sequence number. Default is false.

  26. val snapshotDir: Path

  27. val snapshotFilesystem: FileSystem

    Hadoop filesystem for storing snapshots.

    Hadoop filesystem for storing snapshots.

    Definition Classes
    LeveldbJournalPropsHadoopFilesystemSnapshottingProps
  28. val snapshotLoadTimeout: FiniteDuration

    Timeout for loading a snapshot.

    Timeout for loading a snapshot.

    Definition Classes
    LeveldbJournalPropsHadoopFilesystemSnapshottingProps
  29. val snapshotPath: Path

    Path where snapshots are stored on snapshotFilesystem.

    Path where snapshots are stored on snapshotFilesystem. A relative path is relative to snapshotFilesystem's working directory.

    Definition Classes
    LeveldbJournalPropsHadoopFilesystemSnapshottingProps
  30. val snapshotSaveTimeout: FiniteDuration

    Timeout for saving a snapshot.

    Timeout for saving a snapshot.

    Definition Classes
    LeveldbJournalPropsHadoopFilesystemSnapshottingProps
  31. val snapshotSerializer: SnapshotSerializer

    Serializer for writing and reading snapshots.

    Serializer for writing and reading snapshots.

    Definition Classes
    LeveldbJournalPropsHadoopFilesystemSnapshottingProps
  32. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  33. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  36. def withChecksum(checksum: Boolean): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified checksum verification setting.

  37. def withDispatcherName(dispatcherName: String): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified journal actor dispatcher name.

  38. def withFsync(fsync: Boolean): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified physical sync setting.

  39. def withName(name: String): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified journal actor name.

  40. def withNative(native: Boolean): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified native setting.

  41. def withProcessorStructure: LeveldbJournalProps

    Returns a new LeveldbJournalProps with processorStructured set to true and sequenceStructured set to false.

    Returns a new LeveldbJournalProps with processorStructured set to true and sequenceStructured set to false. With this setting, entries will be primarily ordered by processor id.

    Pros:

    • efficient replay of input messages for all processors (batch replay)
    • efficient replay of input messages for a single processor
    • efficient replay of output messages

    Cons:

    • deletion of old entries requires full scan
  42. def withReadOnly(ro: Boolean): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified read only property

  43. def withSequenceStructure: LeveldbJournalProps

    Returns a new LeveldbJournalProps with processorStructured set to false and sequenceStructured set to true.

    Returns a new LeveldbJournalProps with processorStructured set to false and sequenceStructured set to true. With this setting, entries will be ordered by sequence number.

    Pros:

    • efficient replay of input messages for all processors (batch replay with optional lower bound)
    • efficient replay of output messages
    • efficient deletion of old entries

    Cons:

    • replay of input messages for a single processor requires full scan (with optional lower bound)
  44. def withSnapshotDir(snapshotDir: Path): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified snapshot directory.

  45. def withSnapshotFilesystem(snapshotFilesystem: FileSystem): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified snapshot filesystem.

    Definition Classes
    LeveldbJournalPropsHadoopFilesystemSnapshottingProps
  46. def withSnapshotLoadTimeout(snapshotLoadTimeout: FiniteDuration): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified snapshot load timeout.

    Definition Classes
    LeveldbJournalPropsHadoopFilesystemSnapshottingProps
  47. def withSnapshotSaveTimeout(snapshotSaveTimeout: FiniteDuration): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified snapshot save timeout.

    Definition Classes
    LeveldbJournalPropsHadoopFilesystemSnapshottingProps
  48. def withSnapshotSerializer(snapshotSerializer: SnapshotSerializer): LeveldbJournalProps

    Java API.

    Java API.

    Returns a new LeveldbJournalProps with specified snapshot serializer.

    Definition Classes
    LeveldbJournalPropsHadoopFilesystemSnapshottingProps

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from JournalProps

Inherited from AnyRef

Inherited from Any

Ungrouped