public Send(object message, RemoteActorRef recipient, ActorRef senderOption = null, SeqNo seqOpt = null) { Recipient = recipient; SenderOption = senderOption; Message = message; _seq = seqOpt; }
public AckedSendBuffer(int capacity, SeqNo maxSeq, IImmutableList <T> nacked, IImmutableList <T> nonAcked) { MaxSeq = maxSeq ?? new SeqNo(-1); Nacked = nacked; NonAcked = nonAcked; Capacity = capacity; }
/// <summary> /// Class representing an acknowledgement with select negative acknowledgements. /// </summary> /// <param name="cumulativeAck">Represents the highest sequence number received</param> /// <param name="nacks">Set of sequence numbers between the last delivered one and <paramref name="cumulativeAck"/> that has not been received.</param> public Ack(SeqNo cumulativeAck, IEnumerable <SeqNo> nacks) { Nacks = new SortedSet <SeqNo>(nacks, SeqNo.Comparer); CumulativeAck = cumulativeAck; }
public Send Copy(SeqNo opt) { return(new Send(Message, Recipient, SenderOption, opt)); }
/// <summary> /// TBD /// </summary> /// <param name="lastDelivered">TBD</param> /// <param name="cumulativeAck">TBD</param> /// <param name="buffer">TBD</param> /// <returns>TBD</returns> public AckedReceiveBuffer <T> Copy(SeqNo lastDelivered = null, SeqNo cumulativeAck = null, ImmutableSortedSet <T> buffer = null) { return(new AckedReceiveBuffer <T>(lastDelivered ?? LastDelivered, cumulativeAck ?? CumulativeAck, buffer ?? Buf)); }
/// <summary> /// Merges two receive buffers. Merging preserves sequencing of messages, and drops all messages that has been /// safely acknowledged by any of the participating buffers. Also updates the expected sequence numbers. /// </summary> /// <param name="other">The receive buffer to merge with</param> /// <returns>The merged receive buffer</returns> public AckedReceiveBuffer <T> MergeFrom(AckedReceiveBuffer <T> other) { var mergedLastDelivered = SeqNo.Max(this.LastDelivered, other.LastDelivered); return(Copy(mergedLastDelivered, SeqNo.Max(this.CumulativeAck, other.CumulativeAck), Buf.Union(other.Buf).Where(x => x.Seq > mergedLastDelivered).ToImmutableSortedSet(Comparer))); }
public AckedSendBuffer <T> Copy(IImmutableList <T> nonAcked = null, IImmutableList <T> nacked = null, SeqNo maxSeq = null) { return(new AckedSendBuffer <T>(Capacity, maxSeq ?? MaxSeq, nacked ?? Nacked, nonAcked ?? NonAcked)); }
public AckedSendBuffer(int capacity, SeqNo maxSeq) : this(capacity, maxSeq, ImmutableList <T> .Empty, ImmutableList <T> .Empty) { }