示例#1
0
 public KeyValueEntry(Msg m)
 {
     bucketAndKey = new BucketAndKey(m.Subject);
     Value        = ExtractValue(m.Data);
     DataLength   = CalculateLength(Value, m.Header);
     Created      = m.MetaData.Timestamp;
     Revision     = m.MetaData.StreamSequence;
     Delta        = m.MetaData.NumPending;
     Operation    = KeyValueUtil.GetOperation(m.Header, KeyValueOperation.Put);
 }
示例#2
0
 public KeyValueEntry(MessageInfo mi)
 {
     bucketAndKey = new BucketAndKey(mi.Subject);
     Value        = ExtractValue(mi.Data);
     DataLength   = CalculateLength(Value, mi.Headers);
     Created      = mi.Time;
     Revision     = mi.Sequence;
     Delta        = 0;
     Operation    = KeyValueUtil.GetOperation(mi.Headers, KeyValueOperation.Put);
 }
示例#3
0
        public IList <string> Keys()
        {
            IList <string> list = new List <string>();

            VisitSubject(RawKeySubject(">"), DeliverPolicy.LastPerSubject, true, false, m => {
                KeyValueOperation op = KeyValueUtil.GetOperation(m.Header, KeyValueOperation.Put);
                if (op.Equals(KeyValueOperation.Put))
                {
                    list.Add(new BucketAndKey(m).Key);
                }
            });
            return(list);
        }