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); }
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); }
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); }