public override void WriteEntries(Stream s, BlockDBCache cache) { byte[] bulk = new byte[BulkEntries * EntrySize]; BlockDBCacheNode node = cache.Tail; while (node != null) { int count = node.Count; for (int i = 0; i < count; i += BulkEntries) { int bulkCount = Math.Min(BulkEntries, count - i); for (int j = 0; j < bulkCount; j++) { BlockDBEntry entry = node.Unpack(node.Entries[i + j]); WriteEntry(entry, bulk, j * EntrySize); } s.Write(bulk, 0, bulkCount * EntrySize); } lock (cache.Locker) node = node.Next; } }
public abstract void WriteEntries(Stream s, BlockDBCache cache);
public override void WriteEntries(Stream s, BlockDBCache cache) { throw new NotImplementedException(); }