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