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