Package akka.persistence.typed.javadsl
Class RetentionCriteria
- java.lang.Object
-
- akka.persistence.typed.javadsl.RetentionCriteria
-
- Direct Known Subclasses:
DisabledRetentionCriteria$
,SnapshotCountRetentionCriteria
public abstract class RetentionCriteria extends java.lang.Object
Criteria for retention/deletion of snapshots and events.
-
-
Constructor Summary
Constructors Constructor Description RetentionCriteria()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract RetentionCriteria
asScala()
static RetentionCriteria
disabled()
static SnapshotCountRetentionCriteria
snapshotEvery(int numberOfEvents, int keepNSnapshots)
Save snapshots automatically everynumberOfEvents
.
-
-
-
Method Detail
-
disabled
public static RetentionCriteria disabled()
-
snapshotEvery
public static 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 * numberOfEvents
are automatically deleted.Use
SnapshotCountRetentionCriteria.withDeleteEventsOnSnapshot
to delete old events. Events are not deleted by default.- Parameters:
numberOfEvents
- (undocumented)keepNSnapshots
- (undocumented)- Returns:
- (undocumented)
-
asScala
public abstract RetentionCriteria asScala()
-
-