/// <summary> /// If snapshot from <see cref="GetDeliverySnapshot"/> was saved, it will be received during recovery phase in a /// <see cref="SnapshotOffer"/> message and should be set with this method. /// </summary> /// <param name="snapshot"></param> public void SetDeliverySnapshot(AtLeastOnceDeliverySnapshot snapshot) { _deliverySequenceNr = snapshot.DeliveryId; var now = DateTime.UtcNow; var unconfirmedDeliveries = snapshot.UnconfirmedDeliveries .Select(u => new KeyValuePair <long, Delivery>(u.DeliveryId, new Delivery(u.Destination, u.Message, now, 0))); _unconfirmed = new ConcurrentDictionary <long, Delivery>(unconfirmedDeliveries); }
/// <summary> /// If snapshot from <see cref="GetDeliverySnapshot" /> was saved it will be received during recovery /// phase in a <see cref="SnapshotOffer" /> message and should be set with this method. /// </summary> /// <param name="snapshot">TBD</param> public void SetDeliverySnapshot(AtLeastOnceDeliverySnapshot snapshot) { _deliverySequenceNr = snapshot.CurrentDeliveryId; DateTime now = DateTime.UtcNow; _unconfirmed = snapshot.UnconfirmedDeliveries.Select( u => new KeyValuePair <long, Delivery>(u.DeliveryId, new Delivery(u.Destination, u.Message, now, 0))) .ToImmutableSortedDictionary(); }
/// <summary> /// If snapshot from <see cref="GetDeliverySnapshot" /> was saved it will be received during recovery /// phase in a <see cref="SnapshotOffer" /> message and should be set with this method. /// </summary> /// <param name="snapshot">TBD</param> public void SetDeliverySnapshot(AtLeastOnceDeliverySnapshot snapshot) { _atLeastOnceDeliverySemantic.SetDeliverySnapshot(snapshot); }
/// <summary> /// If snapshot from <see cref="GetDeliverySnapshot" /> was saved, it will be received during recovery phase in a /// <see cref="SnapshotOffer" /> message and should be set with this method. /// </summary> /// <param name="snapshot"></param> public void SetDeliverySnapshot(AtLeastOnceDeliverySnapshot snapshot) { _atLeastOnceDeliverySemantic.SetDeliverySnapshot(snapshot); }
public Snap(Akka.Persistence.AtLeastOnceDeliverySnapshot snapshot) { this.Snapshot = snapshot; }
/// <summary> /// If snapshot from <see cref="GetDeliverySnapshot"/> was saved, it will be received during recovery phase in a /// <see cref="SnapshotOffer"/> message and should be set with this method. /// </summary> /// <param name="snapshot"></param> public void SetDeliverySnapshot(AtLeastOnceDeliverySnapshot snapshot) { _deliverySequenceNr = snapshot.DeliveryId; var now = DateTime.UtcNow; var unconfirmedDeliveries = snapshot.UnconfirmedDeliveries .Select(u => new KeyValuePair<long, Delivery>(u.DeliveryId, new Delivery(u.Destination, u.Message, now, 0))); _unconfirmed = new ConcurrentDictionary<long, Delivery>(unconfirmedDeliveries); }