Package akka.persistence.typed.javadsl
Class RetentionCriteria$
- java.lang.Object
-
- akka.persistence.typed.javadsl.RetentionCriteria$
-
public class RetentionCriteria$ extends java.lang.ObjectCriteria for retention/deletion of snapshots and events.
-
-
Field Summary
Fields Modifier and Type Field Description static RetentionCriteria$MODULE$Static reference to the singleton instance of this Scala object.
-
Constructor Summary
Constructors Constructor Description RetentionCriteria$()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RetentionCriteriadisabled()Snapshots are not saved and deleted automatically, events are not deleted.SnapshotCountRetentionCriteriasnapshotEvery(int numberOfEvents)Save snapshots automatically everynumberOfEvents.SnapshotCountRetentionCriteriasnapshotEvery(int numberOfEvents, int keepNSnapshots)Save snapshots automatically everynumberOfEvents.
-
-
-
Field Detail
-
MODULE$
public static final RetentionCriteria$ MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Method Detail
-
disabled
public RetentionCriteria disabled()
Snapshots are not saved and deleted automatically, events are not deleted.
-
snapshotEvery
public SnapshotCountRetentionCriteria snapshotEvery(int numberOfEvents, int keepNSnapshots)
Save snapshots automatically everynumberOfEvents. Snapshots that have sequence number less than the sequence number of the saved snapshot minuskeepNSnapshots * numberOfEventsare automatically deleted.Use
SnapshotCountRetentionCriteria.withDeleteEventsOnSnapshotto 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.
-
snapshotEvery
public SnapshotCountRetentionCriteria snapshotEvery(int numberOfEvents)
Save snapshots automatically everynumberOfEvents.Use
SnapshotCountRetentionCriteria.withDeleteEventsOnSnapshotto 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.
-
-