Exemple #1
0
        public void Commit()
        {
            foreach (var p in _puts)
            {
                _ds.Put(p.Key, p.Value);
            }

            _deletes.ForEach(_ds.Delete);
        }
Exemple #2
0
        public void Put(DatastoreKey datastoreKey, T value)
        {
            var ks = new KeySync {
                op = PutKey, k = datastoreKey, value = value
            };
            ValueSyc vs;

            if (!Sync(ks, out vs))
            {
                _child.Put(datastoreKey, value);
                Sync(ks);
            }
        }
Exemple #3
0
 public void Put(DatastoreKey datastoreKey, T value)
 {
     _ds.Put(datastoreKey, value);
     _lock.Lock(() => _ttls.Add(datastoreKey, DateTime.Now.Add(_ttl)));
 }
 public void Put(DatastoreKey datastoreKey, T value)
 {
     _callback();
     _ds.Put(datastoreKey, value);
 }