object RetentionCriteria

Criteria for retention/deletion of snapshots and events.

Source
RetentionCriteria.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. RetentionCriteria
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Value Members

  1. val disabled: RetentionCriteria

    Snapshots are not saved and deleted automatically, events are not deleted.

  2. def snapshotEvery(numberOfEvents: Int): SnapshotCountRetentionCriteria

    Save snapshots automatically every numberOfEvents.

    Save snapshots automatically every numberOfEvents.

    Use SnapshotCountRetentionCriteria.withDeleteEventsOnSnapshot to delete old events. Events are not deleted by default.

    If multiple events are persisted with a single Effect, the snapshot will happen after all of the events are persisted rather than precisely every numberOfEvents.

  3. def snapshotEvery(numberOfEvents: Int, keepNSnapshots: Int): SnapshotCountRetentionCriteria

    Save snapshots automatically every numberOfEvents.

    Save snapshots automatically every numberOfEvents. Snapshots that have sequence number less than the sequence number of the saved snapshot minus keepNSnapshots * numberOfEvents are automatically deleted.

    Use SnapshotCountRetentionCriteria.withDeleteEventsOnSnapshot to delete old events. Events are not deleted by default.

    If multiple events are persisted with a single Effect, the snapshot will happen after all of the events are persisted rather than precisely every numberOfEvents.