Package akka.persistence.typed.javadsl
Class Recovery
- java.lang.Object
-
- akka.persistence.typed.javadsl.Recovery
-
- Direct Known Subclasses:
DefaultRecovery$
,DisabledRecovery$
public abstract class Recovery extends java.lang.Object
Strategy for recovery of snapshots and events.
-
-
Constructor Summary
Constructors Constructor Description Recovery()
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract Recovery
asScala()
static Recovery
disabled()
Neither snapshots nor events are recoveredstatic akka.persistence.typed.internal.RecoveryWithSnapshotSelectionCriteria
withSnapshotSelectionCriteria(SnapshotSelectionCriteria snapshotSelectionCriteria)
Changes the snapshot selection criteria used for the recovery.
-
-
-
Method Detail
-
disabled
public static Recovery disabled()
Neither snapshots nor events are recovered
-
withSnapshotSelectionCriteria
public static akka.persistence.typed.internal.RecoveryWithSnapshotSelectionCriteria withSnapshotSelectionCriteria(SnapshotSelectionCriteria snapshotSelectionCriteria)
Changes the snapshot selection criteria used for the recovery.By default the most recent snapshot is used, and the remaining state updates are recovered by replaying events from the sequence number up until which the snapshot reached.
You may configure the behavior to skip replaying snapshots completely, in which case the recovery will be performed by replaying all events -- which may take a long time.
-
asScala
public abstract Recovery asScala()
-
-