private static void RefreshOne(object state) { RefreshData data = (RefreshData)state; int flush_count = data.FlushCount; RevokingDBWithCaching db = data.DB; if (Snapshot.IsRoot(db.GetHead())) { return; } List <ISnapshot> snapshots = new List <ISnapshot>(); SnapshotRoot root = (SnapshotRoot)db.GetHead().GetRoot(); ISnapshot next = root; for (int i = 0; i < flush_count; ++i) { next = next.GetNext(); snapshots.Add(next); } root.Merge(snapshots, data.DB.DBName); root.ResetSolidity(); if (db.GetHead() == next) { db.SetHead(root); } else { next.GetNext().SetPrevious(root); root.SetNext(next.GetNext()); } }
public void Add(IRevokingDB revoking_db) { RevokingDBWithCaching db = (RevokingDBWithCaching)revoking_db; this.databases.Add(db); }