//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: private void createEmptyIndex(org.neo4j.storageengine.api.schema.StoreIndexDescriptor schemaIndexDescriptor, org.neo4j.kernel.impl.index.schema.config.ConfiguredSpaceFillingCurveSettingsCache configuredSettings) throws java.io.IOException private void CreateEmptyIndex(StoreIndexDescriptor schemaIndexDescriptor, ConfiguredSpaceFillingCurveSettingsCache configuredSettings) { SpatialIndexFiles.SpatialFileLayout fileLayout = MakeIndexFile(schemaIndexDescriptor.Id, configuredSettings).LayoutForNewIndex; SpatialIndexPopulator.PartPopulator populator = new SpatialIndexPopulator.PartPopulator(_pageCache, Fs, fileLayout, _monitor, schemaIndexDescriptor, new StandardConfiguration()); populator.Create(); populator.Close(true); }
internal GenericNativeIndexProvider(IndexDirectoryStructure.Factory directoryStructureFactory, PageCache pageCache, FileSystemAbstraction fs, Monitor monitor, RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, bool readOnly, Config config) : base(Descriptor, directoryStructureFactory, pageCache, fs, monitor, recoveryCleanupWorkCollector, readOnly) { this._configuredSettings = new ConfiguredSpaceFillingCurveSettingsCache(config); this._configuration = getConfiguredSpaceFillingCurveConfiguration(config); this._archiveFailedIndex = config.Get(GraphDatabaseSettings.archive_failed_index); this._dropAction = new FileSystemIndexDropAction(fs, directoryStructure()); }
internal SpatialFile(CoordinateReferenceSystem crs, ConfiguredSpaceFillingCurveSettingsCache configuredSettings, File indexDirectory) { this.Crs = crs; this.ConfiguredSettings = configuredSettings; string s = crs.Table.TableId + "-" + Convert.ToString(crs.Code); this.IndexFile = new File(indexDirectory, s); }
public SpatialIndexProvider(PageCache pageCache, FileSystemAbstraction fs, IndexDirectoryStructure.Factory directoryStructure, Monitor monitor, RecoveryCleanupWorkCollector recoveryCleanupWorkCollector, bool readOnly, Config config) : base(_spatialProviderDescriptor, directoryStructure) { this._pageCache = pageCache; this._fs = fs; this._monitor = monitor; this._recoveryCleanupWorkCollector = recoveryCleanupWorkCollector; this._readOnly = readOnly; this._configuration = SpaceFillingCurveSettingsFactory.getConfiguredSpaceFillingCurveConfiguration(config); this._configuredSettings = GetConfiguredSpaceFillingCurveSettings(config); }
private BlockBasedIndexPopulator <GenericKey, NativeIndexValue> InstantiatePopulator(BlockStorage.Monitor monitor, ByteBufferFactory bufferFactory) { Config config = Config.defaults(); ConfiguredSpaceFillingCurveSettingsCache settingsCache = new ConfiguredSpaceFillingCurveSettingsCache(config); IndexSpecificSpaceFillingCurveSettingsCache spatialSettings = new IndexSpecificSpaceFillingCurveSettingsCache(settingsCache, new Dictionary <Org.Neo4j.Values.Storable.CoordinateReferenceSystem, SpaceFillingCurveSettings>()); GenericLayout layout = new GenericLayout(1, spatialSettings); BlockBasedIndexPopulator <GenericKey, NativeIndexValue> populator = new BlockBasedIndexPopulatorAnonymousInnerClass(this, Storage.pageCache(), _fs, _indexFile, layout, EMPTY, _indexDescriptor, spatialSettings, _directoryStructure, _dropAction, bufferFactory, monitor); populator.Create(); return(populator); }
private GenericBlockBasedIndexPopulator InstantiatePopulator(StoreIndexDescriptor indexDescriptor) { Config config = Config.defaults(); ConfiguredSpaceFillingCurveSettingsCache settingsCache = new ConfiguredSpaceFillingCurveSettingsCache(config); IndexSpecificSpaceFillingCurveSettingsCache spatialSettings = new IndexSpecificSpaceFillingCurveSettingsCache(settingsCache, new Dictionary <Org.Neo4j.Values.Storable.CoordinateReferenceSystem, SpaceFillingCurveSettings>()); GenericLayout layout = new GenericLayout(1, spatialSettings); SpaceFillingCurveConfiguration configuration = SpaceFillingCurveSettingsFactory.getConfiguredSpaceFillingCurveConfiguration(config); GenericBlockBasedIndexPopulator populator = new GenericBlockBasedIndexPopulator(Storage.pageCache(), _fs, _indexFile, layout, EMPTY, indexDescriptor, spatialSettings, _directoryStructure, configuration, _dropAction, false, heapBufferFactory(1024)); populator.Create(); return(populator); }
private static LayoutBootstrapper GenericLayout() { return((indexFile, pageCache, meta, targetLayout) => { if (targetLayout.contains("generic")) { string numberOfSlotsString = targetLayout.replace("generic", ""); int numberOfSlots = int.Parse(numberOfSlotsString); IDictionary <CoordinateReferenceSystem, SpaceFillingCurveSettings> settings = new Dictionary <CoordinateReferenceSystem, SpaceFillingCurveSettings>(); GBPTree.readHeader(pageCache, indexFile, new NativeIndexHeaderReader(new SpaceFillingCurveSettingsReader(settings))); ConfiguredSpaceFillingCurveSettingsCache configuredSettings = new ConfiguredSpaceFillingCurveSettingsCache(Config.defaults()); return new GenericLayout(numberOfSlots, new IndexSpecificSpaceFillingCurveSettingsCache(configuredSettings, settings)); } return null; }); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Test public void shouldNotLeakSpaceFillingCurveSettingsBetweenExistingAndNewIndexes() throws Exception //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public virtual void ShouldNotLeakSpaceFillingCurveSettingsBetweenExistingAndNewIndexes() { // given two indexes previously created with different configuredSettings Config config = ConfigWithRange(-10, -10, 10, 10); SpatialIndexProvider provider = NewSpatialIndexProvider(config); AddUpdates(provider, _schemaIndexDescriptor1, _layoutUtil1); AddUpdates(provider, _schemaIndexDescriptor2, _layoutUtil2); // and when creating and populating a third index with a third set of configuredSettings long indexId3 = 3; ConfiguredSpaceFillingCurveSettingsCache settings3 = new ConfiguredSpaceFillingCurveSettingsCache(config); SpatialValueCreatorUtil layoutUtil3 = CreateLayoutTestUtil(indexId3, 44); StoreIndexDescriptor schemaIndexDescriptor3 = layoutUtil3.IndexDescriptor(); CreateEmptyIndex(schemaIndexDescriptor3, provider); AddUpdates(provider, schemaIndexDescriptor3, layoutUtil3); // Then all indexes should still have their own correct and different configuredSettings VerifySpatialSettings(IndexFile(_indexId1), _configuredSettings1.forCRS(_crs)); VerifySpatialSettings(IndexFile(_indexId2), _configuredSettings2.forCRS(_crs)); VerifySpatialSettings(IndexFile(indexId3), settings3.ForCRS(_crs)); }
internal SpatialIndexFiles(IndexDirectoryStructure directoryStructure, long indexId, FileSystemAbstraction fs, ConfiguredSpaceFillingCurveSettingsCache settingsCache) { this._fs = fs; this._configuredSettings = settingsCache; _indexDirectory = directoryStructure.DirectoryForIndex(indexId); }
private SpatialIndexFiles.SpatialFile MakeIndexFile(long indexId, ConfiguredSpaceFillingCurveSettingsCache configuredSettings) { return(new SpatialIndexFiles.SpatialFile(CoordinateReferenceSystem.WGS84, configuredSettings, IndexDir(indexId))); }