Beispiel #1
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: private void assertStoreFormat(org.neo4j.kernel.impl.store.format.RecordFormats expected) throws Exception
        private void AssertStoreFormat(RecordFormats expected)
        {
            Config config = Config.defaults(GraphDatabaseSettings.pagecache_memory, "8m");

            using (JobScheduler jobScheduler = new ThreadPoolJobScheduler(), PageCache pageCache = ConfigurableStandalonePageCacheFactory.createPageCache(_fileSystemRule.get(), config, jobScheduler))
            {
                RecordFormats actual = RecordFormatSelector.selectForStoreOrConfig(config, _testDirectory.databaseLayout(), _fileSystemRule, pageCache, NullLogProvider.Instance);
                assertNotNull(actual);
                assertEquals(expected.StoreVersion(), actual.StoreVersion());
            }
        }
Beispiel #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: TransactionLogCatchUpWriter(org.neo4j.io.layout.DatabaseLayout databaseLayout, org.neo4j.io.fs.FileSystemAbstraction fs, org.neo4j.io.pagecache.PageCache pageCache, org.neo4j.kernel.configuration.Config config, org.neo4j.logging.LogProvider logProvider, long fromTxId, boolean asPartOfStoreCopy, boolean keepTxLogsInStoreDir, boolean forceTransactionRotations) throws java.io.IOException
        internal TransactionLogCatchUpWriter(DatabaseLayout databaseLayout, FileSystemAbstraction fs, PageCache pageCache, Config config, LogProvider logProvider, long fromTxId, bool asPartOfStoreCopy, bool keepTxLogsInStoreDir, bool forceTransactionRotations)
        {
            this._pageCache                  = pageCache;
            this._log                        = logProvider.getLog(this.GetType());
            this._asPartOfStoreCopy          = asPartOfStoreCopy;
            this._rotateTransactionsManually = forceTransactionRotations;
            RecordFormats recordFormats = RecordFormatSelector.selectForStoreOrConfig(Config.defaults(), databaseLayout, fs, pageCache, logProvider);

            this._stores = (new StoreFactory(databaseLayout, config, new DefaultIdGeneratorFactory(fs), pageCache, fs, recordFormats, logProvider, EMPTY)).openNeoStores(META_DATA);
            Dependencies dependencies = new Dependencies();

            dependencies.SatisfyDependency(_stores.MetaDataStore);
            LogFilesBuilder logFilesBuilder = LogFilesBuilder.builder(databaseLayout, fs).withDependencies(dependencies).withLastCommittedTransactionIdSupplier(() => fromTxId - 1).withConfig(CustomisedConfig(config, keepTxLogsInStoreDir, forceTransactionRotations)).withLogVersionRepository(_stores.MetaDataStore);

            this._logFiles = logFilesBuilder.Build();
            this._lifespan.add(_logFiles);
            this._writer         = new TransactionLogWriter(new LogEntryWriter(_logFiles.LogFile.Writer));
            this._databaseLayout = databaseLayout;
            this._expectedTxId   = fromTxId;
        }