Example #1
0
        internal NativeIndexPopulator(PageCache pageCache, FileSystemAbstraction fs, File storeFile, IndexLayout <KEY, VALUE> layout, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, System.Action <PageCursor> additionalHeaderWriter) : base(pageCache, fs, storeFile, layout, monitor, descriptor, false)
        {
            this._treeKey   = layout.newKey();
            this._treeValue = layout.NewValue();
            this._additionalHeaderWriter = additionalHeaderWriter;
            switch (descriptor.Type())
            {
            case GENERAL:
                _uniqueSampler = null;
                break;

            case UNIQUE:
                _uniqueSampler = new UniqueIndexSampler();
                break;

            default:
                throw new System.ArgumentException("Unexpected index type " + descriptor.Type());
            }
        }
Example #2
0
 internal NativeIndexAccessor(PageCache pageCache, FileSystemAbstraction fs, File storeFile, IndexLayout <KEY, VALUE> layout, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, System.Action <PageCursor> additionalHeaderWriter, bool readOnly) : base(pageCache, fs, storeFile, layout, monitor, descriptor, readOnly)
 {
     _singleUpdater = new NativeIndexUpdater <KEY, VALUE>(layout.newKey(), layout.NewValue());
     HeaderWriter   = new NativeIndexHeaderWriter(BYTE_ONLINE, additionalHeaderWriter);
 }