public static List <GetOpResult> Get(string [] keys) { List <GetOpResult> results = new List <GetOpResult>(); foreach (string key in keys) { StoreObject obj = null; lock (_ht) { obj = (StoreObject)_ht[key]; } if (obj != null) { GetOpResult r = new GetOpResult(); r.Value = obj.Value; r.Key = key; r.Flag = obj.Flags; r.Version = 1; r.ReturnResult = Result.SUCCESS; results.Add(r); } } return(results); }
public static OperationResult Set(string key, object value, uint flags) { StoreObject obj = new StoreObject(); obj.Flags = flags; obj.Value = value; lock (_ht) { _ht[key] = obj; } OperationResult result = new OperationResult(); result.ReturnResult = Result.SUCCESS; ulong cas=1; result.Value = cas; return result; }
public static OperationResult Set(string key, object value, uint flags) { StoreObject obj = new StoreObject(); obj.Flags = flags; obj.Value = value; lock (_ht) { _ht[key] = obj; } OperationResult result = new OperationResult(); result.ReturnResult = Result.SUCCESS; ulong cas = 1; result.Value = cas; return(result); }