示例#1
0
        private Proto.Msg.DataEnvelope DataEnvelopeToProto(DataEnvelope msg)
        {
            var proto = new Proto.Msg.DataEnvelope
            {
                Data = this.OtherMessageToProto(msg.Data)
            };

            foreach (var entry in msg.Pruning)
            {
                proto.Pruning.Add(PruningToProto(entry.Key, entry.Value));
            }

            if (!msg.DeltaVersions.IsEmpty)
            {
                proto.DeltaVersions = SerializationSupport.VersionVectorToProto(msg.DeltaVersions);
            }

            return(proto);
        }
示例#2
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="key">TBD</param>
 /// <param name="envelope">TBD</param>
 public ReadRepair(string key, DataEnvelope envelope)
 {
     Key      = key;
     Envelope = envelope;
 }
示例#3
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="envelope">TBD</param>
 public ReadResult(DataEnvelope envelope)
 {
     Envelope = envelope;
 }
示例#4
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="key">TBD</param>
 /// <param name="envelope">TBD</param>
 public Write(string key, DataEnvelope envelope)
 {
     Key      = key;
     Envelope = envelope;
 }
示例#5
0
 public Delta(DataEnvelope dataEnvelope, long fromSeqNr, long toSeqNr)
 {
     DataEnvelope = dataEnvelope;
     FromSeqNr    = fromSeqNr;
     ToSeqNr      = toSeqNr;
 }
示例#6
0
 /// <summary>
 /// TBD
 /// </summary>
 /// <param name="key">TBD</param>
 /// <param name="envelope">TBD</param>
 /// <param name="fromNode">TBD</param>
 public Write(string key, DataEnvelope envelope, UniqueAddress fromNode = null)
 {
     Key      = key;
     Envelope = envelope;
     FromNode = fromNode;
 }