Class Recovery
- All Implemented Interfaces:
Serializable
,scala.Equals
,scala.Product
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.
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionRecovery
(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax) -
Method Summary
Modifier and TypeMethodDescriptionstatic SnapshotSelectionCriteria
static long
static long
static Recovery
apply
(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax) static SnapshotSelectionCriteria
static long
static long
boolean
copy
(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax) long
long
static Recovery
create()
Java APIstatic Recovery
create
(long toSequenceNr) Java APIstatic Recovery
create
(SnapshotSelectionCriteria fromSnapshot) Java APIstatic Recovery
create
(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr) Java APIstatic Recovery
create
(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax) Java APIboolean
int
hashCode()
static Recovery
none()
Convenience method for skipping recovery inPersistentActor
.int
productElement
(int x$1) productElementName
(int x$1) scala.collection.Iterator<Object>
long
long
toString()
static scala.Option<scala.Tuple3<SnapshotSelectionCriteria,
Object, Object>> Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface scala.Product
productElementNames
-
Constructor Details
-
Recovery
-
-
Method Details
-
$lessinit$greater$default$1
-
$lessinit$greater$default$2
public static long $lessinit$greater$default$2() -
$lessinit$greater$default$3
public static long $lessinit$greater$default$3() -
create
Java API- See Also:
-
create
Java API- See Also:
-
create
Java API- See Also:
-
create
Java API- See Also:
-
create
public static Recovery create(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax) Java API- See Also:
-
none
Convenience method for skipping recovery inPersistentActor
.It will still retrieve previously highest sequence number so that new events are persisted with higher sequence numbers rather than starting from 1 and assuming that there are no previous event with that sequence number.
- See Also:
-
apply
public static Recovery apply(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax) -
apply$default$1
-
apply$default$2
public static long apply$default$2() -
apply$default$3
public static long apply$default$3() -
unapply
public static scala.Option<scala.Tuple3<SnapshotSelectionCriteria,Object, unapplyObject>> (Recovery x$0) -
fromSnapshot
-
toSequenceNr
public long toSequenceNr() -
replayMax
public long replayMax() -
copy
-
copy$default$1
-
copy$default$2
public long copy$default$2() -
copy$default$3
public long copy$default$3() -
productPrefix
- Specified by:
productPrefix
in interfacescala.Product
-
productArity
public int productArity()- Specified by:
productArity
in interfacescala.Product
-
productElement
- Specified by:
productElement
in interfacescala.Product
-
productIterator
- Specified by:
productIterator
in interfacescala.Product
-
canEqual
- Specified by:
canEqual
in interfacescala.Equals
-
productElementName
- Specified by:
productElementName
in interfacescala.Product
-
hashCode
public int hashCode() -
toString
-
equals
-