/// <summary>
 /// Deletes all snapshots matching <paramref name="criteria"/>.
 ///
 /// The <see cref="PersistentActor"/> will be notified about the status of the deletion
 /// via an <see cref="DeleteSnapshotsSuccess"/> or <see cref="DeleteSnapshotsFailure"/> message.
 /// </summary>
 public void DeleteSnapshots(SnapshotSelectionCriteria criteria)
 {
     SnapshotStore.Tell(new DeleteSnapshots(SnapshotterId, criteria));
 }
Esempio n. 2
0
 public Recovery(SnapshotSelectionCriteria fromSnapshot = null, long toSequenceNr = long.MaxValue, long replayMax = long.MaxValue)
 {
     FromSnapshot = fromSnapshot != null ? fromSnapshot : SnapshotSelectionCriteria.Latest;
     ToSequenceNr = toSequenceNr;
     ReplayMax    = replayMax;
 }
 /// <summary>
 /// Instructs the snapshot store to load the specified snapshot and send it via an
 /// <see cref="SnapshotOffer"/> to the running <see cref="PersistentActor"/>.
 /// </summary>
 public void LoadSnapshot(string persistenceId, SnapshotSelectionCriteria criteria, long toSequenceNr)
 {
     SnapshotStore.Tell(new LoadSnapshot(persistenceId, criteria, toSequenceNr));
 }
Esempio n. 4
0
 public Recovery(SnapshotSelectionCriteria fromSnapshot) : this(fromSnapshot, long.MaxValue)
 {
 }
Esempio n. 5
0
 public Recovery(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr) : this(fromSnapshot, toSequenceNr, long.MaxValue)
 {
 }
Esempio n. 6
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LoadSnapshot"/> class.
 /// </summary>
 /// <param name="persistenceId">Persistent actor identifier.</param>
 /// <param name="criteria">Criteria for selecting snapshot, from which the recovery should start.</param>
 /// <param name="toSequenceNr">Upper, inclusive sequence number bound for recovery.</param>
 public LoadSnapshot(string persistenceId, SnapshotSelectionCriteria criteria, long toSequenceNr)
 {
     PersistenceId = persistenceId;
     Criteria      = criteria;
     ToSequenceNr  = toSequenceNr;
 }
Esempio n. 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeleteSnapshotsFailure"/> class.
 /// </summary>
 /// <param name="criteria">Snapshot selection criteria.</param>
 /// <param name="cause">A failure cause.</param>
 public DeleteSnapshotsFailure(SnapshotSelectionCriteria criteria, Exception cause)
 {
     Criteria = criteria;
     Cause    = cause;
 }
Esempio n. 8
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeleteSnapshotsSuccess"/> class.
 /// </summary>
 /// <param name="criteria">Snapshot selection criteria.</param>
 public DeleteSnapshotsSuccess(SnapshotSelectionCriteria criteria)
 {
     Criteria = criteria;
 }
Esempio n. 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DeleteSnapshots"/> class.
 /// </summary>
 /// <param name="persistenceId">Persistent actor id.</param>
 /// <param name="criteria">Criteria for selecting snapshots to be deleted.</param>
 public DeleteSnapshots(string persistenceId, SnapshotSelectionCriteria criteria)
 {
     PersistenceId = persistenceId;
     Criteria      = criteria;
 }
Esempio n. 10
0
 public Recover(SnapshotSelectionCriteria fromSnapshot, long toSequenceNr = long.MaxValue, long replayMax = long.MaxValue)
 {
     FromSnapshot = fromSnapshot;
     ToSequenceNr = toSequenceNr;
     ReplayMax    = replayMax;
 }