public final class Recovery
extends java.lang.Object
implements scala.Product, scala.Serializable
PersistenceRecovery.recovery()
.
By default recovers from latest snapshot replays through to the last available event (last sequenceId).
Recovery will start from a snapshot if the persistent actor has previously saved one or more snapshots
and at least one of these snapshots matches the specified fromSnapshot
criteria.
Otherwise, recovery will start from scratch by replaying all stored events.
If recovery starts from a snapshot, the persistent actor is offered that snapshot with a SnapshotOffer
message, followed by replayed messages, if any, that are younger than the snapshot, up to the
specified upper sequence number bound (toSequenceNr
).
param: fromSnapshot criteria for selecting a saved snapshot from which recovery should start. Default is latest (= youngest) snapshot. param: toSequenceNr upper sequence number bound (inclusive) for recovery. Default is no upper bound. param: replayMax maximum number of messages to replay. Default is no limit.
Constructor and Description |
---|
Recovery(SnapshotSelectionCriteria fromSnapshot,
long toSequenceNr,
long replayMax) |
Modifier and Type | Method and Description |
---|---|
abstract static boolean |
canEqual(java.lang.Object that) |
static Recovery |
create()
Java API
|
static Recovery |
create(long toSequenceNr)
Java API
|
static Recovery |
create(SnapshotSelectionCriteria fromSnapshot)
Java API
|
static Recovery |
create(SnapshotSelectionCriteria fromSnapshot,
long toSequenceNr)
Java API
|
static Recovery |
create(SnapshotSelectionCriteria fromSnapshot,
long toSequenceNr,
long replayMax)
Java API
|
abstract static boolean |
equals(java.lang.Object that) |
SnapshotSelectionCriteria |
fromSnapshot() |
static Recovery |
none()
Convenience method for skipping recovery in
PersistentActor . |
abstract static int |
productArity() |
abstract static java.lang.Object |
productElement(int n) |
static scala.collection.Iterator<java.lang.Object> |
productIterator() |
static java.lang.String |
productPrefix() |
long |
replayMax() |
long |
toSequenceNr() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
public Recovery(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)
public static Recovery create(long toSequenceNr)
toSequenceNr
- (undocumented)Recovery
public static Recovery create(SnapshotSelectionCriteria fromSnapshot)
fromSnapshot
- (undocumented)Recovery
public static Recovery create(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr)
fromSnapshot
- (undocumented)toSequenceNr
- (undocumented)Recovery
public static Recovery create(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)
fromSnapshot
- (undocumented)toSequenceNr
- (undocumented)replayMax
- (undocumented)Recovery
public static Recovery none()
PersistentActor
.Recovery
public abstract static boolean canEqual(java.lang.Object that)
public abstract static boolean equals(java.lang.Object that)
public abstract static java.lang.Object productElement(int n)
public abstract static int productArity()
public static scala.collection.Iterator<java.lang.Object> productIterator()
public static java.lang.String productPrefix()
public SnapshotSelectionCriteria fromSnapshot()
public long toSequenceNr()
public long replayMax()