Class RetentionCriteria$
java.lang.Object
org.apache.pekko.persistence.typed.scaladsl.RetentionCriteria$
Criteria for retention/deletion of snapshots and events.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final RetentionCriteria$Static reference to the singleton instance of this Scala object. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondisabled()Snapshots are not saved and deleted automatically, events are not deleted.snapshotEvery(int numberOfEvents, int keepNSnapshots) Save snapshots automatically everynumberOfEvents.
-
Field Details
-
MODULE$
Static reference to the singleton instance of this Scala object.
-
-
Constructor Details
-
RetentionCriteria$
public RetentionCriteria$()
-
-
Method Details
-
disabled
Snapshots are not saved and deleted automatically, events are not deleted. -
snapshotEvery
Save snapshots automatically everynumberOfEvents. Snapshots that have sequence number less than 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.
-