Ejemplo n.º 1
0
 internal NativeIndexReader(GBPTree <KEY, VALUE> tree, IndexLayout <KEY, VALUE> layout, IndexDescriptor descriptor)
 {
     this.Tree        = tree;
     this.Layout      = layout;
     this.Descriptor  = descriptor;
     this.OpenSeekers = new HashSet <RawCursor <Hit <KEY, VALUE>, IOException> >();
 }
Ejemplo n.º 2
0
 internal PartAccessor(PageCache pageCache, FileSystemAbstraction fs, SpatialIndexFiles.SpatialFileLayout fileLayout, RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, SpaceFillingCurveConfiguration searchConfiguration, bool readOnly) : base(pageCache, fs, fileLayout.IndexFile, fileLayout.Layout, monitor, descriptor, NO_HEADER_WRITER, readOnly)
 {
     this.Layout              = fileLayout.Layout;
     this.Descriptor          = descriptor;
     this.SearchConfiguration = searchConfiguration;
     this.Crs      = fileLayout.SpatialFile.crs;
     this.Settings = fileLayout.Settings;
     instantiateTree(recoveryCleanupWorkCollector, HeaderWriter);
 }
Ejemplo n.º 3
0
 internal NativeIndex(PageCache pageCache, FileSystemAbstraction fs, File storeFile, IndexLayout <KEY, VALUE> layout, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, bool readOnly)
 {
     this.PageCache  = pageCache;
     this.StoreFile  = storeFile;
     this.Layout     = layout;
     this.FileSystem = fs;
     this.Descriptor = descriptor;
     this._monitor   = monitor;
     this._readOnly  = readOnly;
 }
Ejemplo n.º 4
0
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes:
//ORIGINAL LINE: @Before public void setup() throws java.io.IOException
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
        public virtual void Setup()
        {
            ValueCreatorUtil        = CreateValueCreatorUtil();
            IndexDescriptor         = ValueCreatorUtil.indexDescriptor();
            Layout                  = CreateLayout();
            IndexDirectoryStructure = directoriesByProvider(_directory.directory("root")).forProvider(IndexDescriptor.providerDescriptor());
            _indexFile              = IndexDirectoryStructure.directoryForIndex(IndexDescriptor.Id);
            Fs.mkdirs(_indexFile.ParentFile);
            PageCache = _pageCacheRule.getPageCache(Fs);
        }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: static void verify(org.neo4j.storageengine.api.NodePropertyAccessor nodePropertyAccessor, IndexLayout<SpatialIndexKey,NativeIndexValue> layout, org.neo4j.index.internal.gbptree.GBPTree<SpatialIndexKey,NativeIndexValue> tree, org.neo4j.storageengine.api.schema.StoreIndexDescriptor descriptor) throws org.neo4j.kernel.api.exceptions.index.IndexEntryConflictException
        internal static void Verify(NodePropertyAccessor nodePropertyAccessor, IndexLayout <SpatialIndexKey, NativeIndexValue> layout, GBPTree <SpatialIndexKey, NativeIndexValue> tree, StoreIndexDescriptor descriptor)
        {
            SpatialIndexKey from = layout.newKey();
            SpatialIndexKey to   = layout.newKey();

            InitializeKeys(from, to);
            try
            {
                using (RawCursor <Hit <SpatialIndexKey, NativeIndexValue>, IOException> seek = tree.Seek(from, to))
                {
                    ScanAndVerifyDuplicates(nodePropertyAccessor, descriptor, seek);
                }
            }
            catch (IOException e)
            {
                throw new UncheckedIOException(e);
            }
        }
Ejemplo n.º 6
0
 internal StringIndexPopulator(PageCache pageCache, FileSystemAbstraction fs, File storeFile, IndexLayout <StringIndexKey, NativeIndexValue> layout, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor) : base(pageCache, fs, storeFile, layout, monitor, descriptor, NO_HEADER_WRITER)
 {
 }
Ejemplo n.º 7
0
 internal PropertyLookupFallbackComparator(IndexLayout <KEY, VALUE> schemaLayout, NodePropertyAccessor propertyAccessor, int propertyKeyId)
 {
     this._schemaLayout     = schemaLayout;
     this._propertyAccessor = propertyAccessor;
     this._propertyKeyId    = propertyKeyId;
 }
Ejemplo n.º 8
0
 internal StringIndexAccessor(PageCache pageCache, FileSystemAbstraction fs, File storeFile, IndexLayout <StringIndexKey, NativeIndexValue> layout, RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, bool readOnly) : base(pageCache, fs, storeFile, layout, monitor, descriptor, NO_HEADER_WRITER, readOnly)
 {
     instantiateTree(recoveryCleanupWorkCollector, HeaderWriter);
 }
Ejemplo n.º 9
0
 internal NativeDistinctValuesProgressor(RawCursor <Hit <KEY, VALUE>, IOException> seeker, Org.Neo4j.Storageengine.Api.schema.IndexProgressor_NodeValueClient client, ICollection <RawCursor <Hit <KEY, VALUE>, IOException> > toRemoveFromOnClose, IndexLayout <KEY, VALUE> layout, IComparer <KEY> comparator) : base(seeker, client, toRemoveFromOnClose)
 {
     this._layout     = layout;
     _prev            = layout.newKey();
     this._comparator = comparator;
 }
Ejemplo n.º 10
0
 internal GenericNativeIndexAccessor(PageCache pageCache, FileSystemAbstraction fs, File storeFile, IndexLayout <GenericKey, NativeIndexValue> layout, RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, IndexSpecificSpaceFillingCurveSettingsCache spaceFillingCurveSettings, SpaceFillingCurveConfiguration configuration, IndexDropAction dropAction, bool readOnly) : base(pageCache, fs, storeFile, layout, monitor, descriptor, new SpaceFillingCurveSettingsWriter(spaceFillingCurveSettings), readOnly)
 {
     this._spaceFillingCurveSettings = spaceFillingCurveSettings;
     this._configuration             = configuration;
     this._dropAction = dropAction;
     instantiateTree(recoveryCleanupWorkCollector, HeaderWriter);
 }
Ejemplo n.º 11
0
 internal TemporalIndexPartReader(GBPTree <KEY, NativeIndexValue> tree, IndexLayout <KEY, NativeIndexValue> layout, IndexDescriptor descriptor) : base(tree, layout, descriptor)
 {
 }
Ejemplo n.º 12
0
 internal GenericNativeIndexPopulator(PageCache pageCache, FileSystemAbstraction fs, File storeFile, IndexLayout <GenericKey, NativeIndexValue> layout, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, IndexSpecificSpaceFillingCurveSettingsCache spatialSettings, IndexDirectoryStructure directoryStructure, SpaceFillingCurveConfiguration configuration, IndexDropAction dropAction, bool archiveFailedIndex) : base(pageCache, fs, storeFile, layout, monitor, descriptor, new SpaceFillingCurveSettingsWriter(spatialSettings))
 {
     this._spatialSettings    = spatialSettings;
     this._directoryStructure = directoryStructure;
     this._configuration      = configuration;
     this._dropAction         = dropAction;
     this._archiveFailedIndex = archiveFailedIndex;
 }
Ejemplo n.º 13
0
 internal PartAccessor(PageCache pageCache, FileSystemAbstraction fs, TemporalIndexFiles.FileLayout <KEY> fileLayout, RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, bool readOnly) : base(pageCache, fs, fileLayout.IndexFile, fileLayout.Layout, monitor, descriptor, NO_HEADER_WRITER, readOnly)
 {
     this.Layout     = fileLayout.Layout;
     this.Descriptor = descriptor;
     instantiateTree(recoveryCleanupWorkCollector, headerWriter);
 }
Ejemplo n.º 14
0
 internal FileLayout(File indexFile, IndexLayout <KEY, NativeIndexValue> layout, ValueGroup valueGroup)
 {
     this.IndexFile  = indexFile;
     this.Layout     = layout;
     this.ValueGroup = valueGroup;
 }
Ejemplo n.º 15
0
 internal GenericBlockBasedIndexPopulator(PageCache pageCache, FileSystemAbstraction fs, File file, IndexLayout <GenericKey, NativeIndexValue> layout, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, IndexSpecificSpaceFillingCurveSettingsCache spatialSettings, IndexDirectoryStructure directoryStructure, SpaceFillingCurveConfiguration configuration, IndexDropAction dropAction, bool archiveFailedIndex, ByteBufferFactory bufferFactory) : base(pageCache, fs, file, layout, monitor, descriptor, spatialSettings, directoryStructure, dropAction, archiveFailedIndex, bufferFactory)
 {
     this._spatialSettings = spatialSettings;
     this._configuration   = configuration;
 }
Ejemplo n.º 16
0
 internal SpatialIndexPartReader(GBPTree <SpatialIndexKey, VALUE> tree, IndexLayout <SpatialIndexKey, VALUE> layout, IndexDescriptor descriptor, SpaceFillingCurveConfiguration configuration) : base(tree, layout, descriptor)
 {
     _spatial            = ( SpatialLayout )layout;
     this._configuration = configuration;
 }
Ejemplo n.º 17
0
 internal BlockBasedIndexPopulator(PageCache pageCache, FileSystemAbstraction fs, File file, IndexLayout <KEY, VALUE> layout, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, IndexSpecificSpaceFillingCurveSettingsCache spatialSettings, IndexDirectoryStructure directoryStructure, IndexDropAction dropAction, bool archiveFailedIndex, ByteBufferFactory bufferFactory, int mergeFactor, BlockStorage.Monitor blockStorageMonitor) : base(pageCache, fs, file, layout, monitor, descriptor, new SpaceFillingCurveSettingsWriter(spatialSettings))
 {
     this._directoryStructure  = directoryStructure;
     this._dropAction          = dropAction;
     this._archiveFailedIndex  = archiveFailedIndex;
     this._mergeFactor         = mergeFactor;
     this._blockStorageMonitor = blockStorageMonitor;
     this._scanUpdates         = ThreadLocal.withInitial(this.newThreadLocalBlockStorage);
     this._bufferFactory       = bufferFactory;
 }
Ejemplo n.º 18
0
 internal GenericNativeIndexReader(GBPTree <GenericKey, NativeIndexValue> tree, IndexLayout <GenericKey, NativeIndexValue> layout, IndexDescriptor descriptor, IndexSpecificSpaceFillingCurveSettingsCache spaceFillingCurveSettings, SpaceFillingCurveConfiguration configuration) : base(tree, layout, descriptor)
 {
     this._spaceFillingCurveSettings = spaceFillingCurveSettings;
     this._configuration             = configuration;
 }
Ejemplo n.º 19
0
 internal SpatialFileLayout(SpatialFile spatialFile, SpaceFillingCurveSettings settings)
 {
     this.SpatialFile = spatialFile;
     this.Settings    = settings;
     this.Layout      = new SpatialLayout(spatialFile.Crs, settings.Curve());
 }
Ejemplo n.º 20
0
 internal BlockBasedIndexPopulator(PageCache pageCache, FileSystemAbstraction fs, File file, IndexLayout <KEY, VALUE> layout, IndexProvider.Monitor monitor, StoreIndexDescriptor descriptor, IndexSpecificSpaceFillingCurveSettingsCache spatialSettings, IndexDirectoryStructure directoryStructure, IndexDropAction dropAction, bool archiveFailedIndex, ByteBufferFactory bufferFactory) : this(pageCache, fs, file, layout, monitor, descriptor, spatialSettings, directoryStructure, dropAction, archiveFailedIndex, bufferFactory, FeatureToggles.getInteger(typeof(BlockBasedIndexPopulator), "mergeFactor", 8), NO_MONITOR)
 {
 }
Ejemplo n.º 21
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());
            }
        }
Ejemplo n.º 22
0
 internal FullScanNonUniqueIndexSampler(GBPTree <KEY, VALUE> gbpTree, IndexLayout <KEY, VALUE> layout)
 {
     this._gbpTree = gbpTree;
     this._layout  = layout;
 }
Ejemplo n.º 23
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);
 }
Ejemplo n.º 24
0
 internal StringIndexReader(GBPTree <StringIndexKey, NativeIndexValue> tree, IndexLayout <StringIndexKey, NativeIndexValue> layout, IndexDescriptor descriptor) : base(tree, layout, descriptor)
 {
 }