Class Recovery
- java.lang.Object
-
- akka.persistence.Recovery
-
- All Implemented Interfaces:
java.io.Serializable,scala.Equals,scala.Product
public final class Recovery extends java.lang.Object implements scala.Product, java.io.SerializableRecovery mode configuration object to be returned inPersistenceRecovery.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
fromSnapshotcriteria. 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
SnapshotOffermessage, 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:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Recovery(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SnapshotSelectionCriteria$lessinit$greater$default$1()static long$lessinit$greater$default$2()static long$lessinit$greater$default$3()static Recoveryapply(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)static SnapshotSelectionCriteriaapply$default$1()static longapply$default$2()static longapply$default$3()booleancanEqual(java.lang.Object x$1)Recoverycopy(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)SnapshotSelectionCriteriacopy$default$1()longcopy$default$2()longcopy$default$3()static Recoverycreate()Java APIstatic Recoverycreate(long toSequenceNr)Java APIstatic Recoverycreate(SnapshotSelectionCriteria fromSnapshot)Java APIstatic Recoverycreate(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr)Java APIstatic Recoverycreate(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)Java APIbooleanequals(java.lang.Object x$1)SnapshotSelectionCriteriafromSnapshot()inthashCode()static Recoverynone()Convenience method for skipping recovery inPersistentActor.intproductArity()java.lang.ObjectproductElement(int x$1)java.lang.StringproductElementName(int x$1)scala.collection.Iterator<java.lang.Object>productIterator()java.lang.StringproductPrefix()longreplayMax()longtoSequenceNr()java.lang.StringtoString()static scala.Option<scala.Tuple3<SnapshotSelectionCriteria,java.lang.Object,java.lang.Object>>unapply(Recovery x$0)
-
-
-
Constructor Detail
-
Recovery
public Recovery(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)
-
-
Method Detail
-
$lessinit$greater$default$1
public static SnapshotSelectionCriteria $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
public static Recovery create(SnapshotSelectionCriteria fromSnapshot)
Java API- See Also:
Recovery
-
create
public static Recovery create(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr)
Java API- See Also:
Recovery
-
create
public static Recovery create(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)
Java API- See Also:
Recovery
-
none
public static Recovery 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:
Recovery
-
apply
public static Recovery apply(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)
-
apply$default$1
public static SnapshotSelectionCriteria 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,java.lang.Object,java.lang.Object>> unapply(Recovery x$0)
-
fromSnapshot
public SnapshotSelectionCriteria fromSnapshot()
-
toSequenceNr
public long toSequenceNr()
-
replayMax
public long replayMax()
-
copy
public Recovery copy(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)
-
copy$default$1
public SnapshotSelectionCriteria copy$default$1()
-
copy$default$2
public long copy$default$2()
-
copy$default$3
public long copy$default$3()
-
productPrefix
public java.lang.String productPrefix()
- Specified by:
productPrefixin interfacescala.Product
-
productArity
public int productArity()
- Specified by:
productArityin interfacescala.Product
-
productElement
public java.lang.Object productElement(int x$1)
- Specified by:
productElementin interfacescala.Product
-
productIterator
public scala.collection.Iterator<java.lang.Object> productIterator()
- Specified by:
productIteratorin interfacescala.Product
-
canEqual
public boolean canEqual(java.lang.Object x$1)
- Specified by:
canEqualin interfacescala.Equals
-
productElementName
public java.lang.String productElementName(int x$1)
- Specified by:
productElementNamein interfacescala.Product
-
hashCode
public int hashCode()
- Overrides:
hashCodein classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
equals
public boolean equals(java.lang.Object x$1)
- Specified by:
equalsin interfacescala.Equals- Overrides:
equalsin classjava.lang.Object
-
-