akka.persistence
Class Recover

java.lang.Object
  extended by akka.persistence.Recover
All Implemented Interfaces:
java.io.Serializable, scala.Equals, scala.Product

public class Recover
extends java.lang.Object
implements scala.Product, scala.Serializable

Instructs a persistent actor to recover itself. 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 journaled messages.

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:
Serialized Form

Constructor Summary
Recover(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)
           
 
Method Summary
static Recover create()
          Java API.
static Recover create(long toSequenceNr)
          Java API.
static Recover create(SnapshotSelectionCriteria fromSnapshot)
          Java API.
static Recover create(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr)
          Java API.
static Recover create(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr, long replayMax)
          Java API.
 SnapshotSelectionCriteria fromSnapshot()
           
 long replayMax()
           
 long toSequenceNr()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface scala.Product
productArity, productElement, productIterator, productPrefix
 
Methods inherited from interface scala.Equals
canEqual, equals
 

Constructor Detail

Recover

public Recover(SnapshotSelectionCriteria fromSnapshot,
               long toSequenceNr,
               long replayMax)
Method Detail

create

public static Recover create()
Java API.

Returns:
(undocumented)
See Also:
Recover

create

public static Recover create(long toSequenceNr)
Java API.

Parameters:
toSequenceNr - (undocumented)
Returns:
(undocumented)
See Also:
Recover

create

public static Recover create(SnapshotSelectionCriteria fromSnapshot)
Java API.

Parameters:
fromSnapshot - (undocumented)
Returns:
(undocumented)
See Also:
Recover

create

public static Recover create(SnapshotSelectionCriteria fromSnapshot,
                             long toSequenceNr)
Java API.

Parameters:
fromSnapshot - (undocumented)
toSequenceNr - (undocumented)
Returns:
(undocumented)
See Also:
Recover

create

public static Recover create(SnapshotSelectionCriteria fromSnapshot,
                             long toSequenceNr,
                             long replayMax)
Java API.

Parameters:
fromSnapshot - (undocumented)
toSequenceNr - (undocumented)
replayMax - (undocumented)
Returns:
(undocumented)
See Also:
Recover

fromSnapshot

public SnapshotSelectionCriteria fromSnapshot()

toSequenceNr

public long toSequenceNr()

replayMax

public long replayMax()