public override void Close() { if (_closedCallback != null) { _closedCallback.accept(_transactionId); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void execute(String[] args) throws org.neo4j.commandline.admin.IncorrectUsage, org.neo4j.commandline.admin.CommandFailed public override void Execute(string[] args) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final java.nio.file.Path databaseDirectory = arguments.parse(args).getMandatoryPath("store"); Path databaseDirectory = _arguments.parse(args).getMandatoryPath("store"); Validators.CONTAINS_EXISTING_DATABASE.validate(databaseDirectory.toFile()); DatabaseLayout databaseLayout = DatabaseLayout.of(databaseDirectory.toFile()); try { using (System.IDisposable ignored = StoreLockChecker.Check(databaseLayout.StoreLayout), DefaultFileSystemAbstraction fileSystem = new DefaultFileSystemAbstraction(), JobScheduler jobScheduler = createInitialisedScheduler(), PageCache pageCache = StandalonePageCacheFactory.createPageCache(fileSystem, jobScheduler)) { //JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final': //ORIGINAL LINE: final String storeVersion = new org.neo4j.kernel.impl.storemigration.StoreVersionCheck(pageCache).getVersion(databaseLayout.metadataStore()).orElseThrow(() -> new org.neo4j.commandline.admin.CommandFailed(String.format("Could not find version metadata in store '%s'", databaseDirectory))); string storeVersion = (new StoreVersionCheck(pageCache)).getVersion(databaseLayout.MetadataStore()).orElseThrow(() => new CommandFailed(string.Format("Could not find version metadata in store '{0}'", databaseDirectory))); const string fmt = "%-30s%s"; @out.accept(string.format(fmt, "Store format version:", storeVersion)); RecordFormats format = RecordFormatSelector.selectForVersion(storeVersion); @out.accept(string.format(fmt, "Store format introduced in:", format.IntroductionVersion())); findSuccessor(format).map(next => string.format(fmt, "Store format superseded in:", next.introductionVersion())).ifPresent(@out); } } catch (StoreLockException e) { throw new CommandFailed("the database is in use -- stop Neo4j and try again", e); } catch (Exception e) { throw new CommandFailed(e.Message, e); } }
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public void close() throws Exception public override void Close() { ApplierCloseCall.accept(true); Actual.close(); }