Implement a Index service - Add/Remove index nodes on SkipList Based on: http://igoro.com/archive/skip-lists-are-fascinating/
Пример #1
0
        /// <summary>
        /// Initialize database reader with database stream file and password
        /// </summary>
        public bool Initialize(Stream stream, string password)
        {
            // test if current stream is V6
            if (stream.ReadByte(25 + 27) != 6)
            {
                return(false);
            }

            _disk        = new FileDiskService(stream, password);
            _pager       = new PageService(_disk);
            _indexer     = new IndexService(_pager);
            _data        = new DataService(_pager);
            _collections = new CollectionService(_pager);

            return(true);
        }
Пример #2
0
 public CollectionService(PageService pager, IndexService indexer, DataService data)
 {
     _pager   = pager;
     _indexer = indexer;
     _data    = data;
 }
Пример #3
0
 public CollectionService(PageService pager, IndexService indexer, DataService data)
 {
     _pager = pager;
     _indexer = indexer;
     _data = data;
 }