Exemple #1
0
        private void GC()
        {
            var now = DateTime.Now;
            var del = new List <DatastoreKey>();

            _lock.Wait();
            try
            {
                foreach (var ttl in _ttls)
                {
                    if (ttl.Value > now)
                    {
                        del.Add(ttl.Key);
                    }
                }
                foreach (var ttl in del)
                {
                    _ttls.Remove(ttl);
                }
            }
            finally
            {
                _lock.Release();
            }

            foreach (var k in del)
            {
                _ds.Delete(k);
            }
        }
Exemple #2
0
        public void Delete(DatastoreKey datastoreKey)
        {
            var ks = new KeySync {
                op = DeleteKey, k = datastoreKey
            };
            ValueSyc vs;

            if (!Sync(ks, out vs))
            {
                _child.Delete(datastoreKey);
                Sync(ks);
            }
        }
Exemple #3
0
        /// <inheritdoc />
        public void Delete(Guid guid)
        {
            var deletedEntry = index.Delete(guid);

            datastore.Delete(deletedEntry.DataOffset, deletedEntry.DataSize);
        }
 public void Delete(DatastoreKey datastoreKey)
 {
     _callback();
     _ds.Delete(datastoreKey);
 }