Esempio n. 1
0
        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;
            }
        }
Esempio n. 2
0
 public abstract void WriteEntries(Stream s, BlockDBCache cache);
Esempio n. 3
0
 public override void WriteEntries(Stream s, BlockDBCache cache)
 {
     throw new NotImplementedException();
 }