//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: //ORIGINAL LINE: public java.io.File dumpState(Locks lm, LockWorker... workers) throws java.io.IOException public virtual File DumpState(Locks lm, params LockWorker[] workers) { FileStream @out = new FileStream(_file, false); FormattedLogProvider logProvider = FormattedLogProvider.withoutAutoFlush().toOutputStream(@out); try { // * locks held by the lock manager lm.Accept(new DumpLocksVisitor(logProvider.GetLog(typeof(LockWorkFailureDump)))); // * rag manager state; // * workers state Log log = logProvider.getLog(this.GetType()); foreach (LockWorker worker in workers) { // - what each is doing and have up to now log.Info("Worker %s", worker); } return(_file); } finally { @out.Flush(); @out.Close(); } }
/// <summary> /// Create page cache </summary> /// <param name="fileSystem"> file system that page cache will be based on </param> /// <param name="pageCacheTracer"> global page cache tracer </param> /// <param name="pageCursorTracerSupplier"> supplier of thread local (transaction local) page cursor tracer that will provide /// thread local page cache statistics </param> /// <param name="config"> page cache configuration </param> /// <param name="versionContextSupplier"> version context supplier </param> /// <param name="jobScheduler"> page cache job scheduler </param> /// <returns> created page cache instance </returns> public static PageCache CreatePageCache(FileSystemAbstraction fileSystem, PageCacheTracer pageCacheTracer, PageCursorTracerSupplier pageCursorTracerSupplier, Config config, VersionContextSupplier versionContextSupplier, JobScheduler jobScheduler) { config.AugmentDefaults(GraphDatabaseSettings.pagecache_memory, "8M"); ZoneId logTimeZone = config.Get(GraphDatabaseSettings.db_timezone).ZoneId; FormattedLogProvider logProvider = FormattedLogProvider.withZoneId(logTimeZone).toOutputStream(System.err); ConfiguringPageCacheFactory pageCacheFactory = new ConfiguringPageCacheFactory(fileSystem, config, pageCacheTracer, pageCursorTracerSupplier, logProvider.GetLog(typeof(PageCache)), versionContextSupplier, jobScheduler); return(pageCacheFactory.OrCreatePageCache); }
private PageCache CreatePageCache(FileSystemAbstraction fs, PageCacheConfig pageCacheConfig, Config config) { PageCacheTracer tracer = SelectConfig(BaseConfig.tracer, pageCacheConfig.Tracer, PageCacheTracer.NULL); PageCursorTracerSupplier cursorTracerSupplier = SelectConfig(BaseConfig.pageCursorTracerSupplier, pageCacheConfig.PageCursorTracerSupplier, Org.Neo4j.Io.pagecache.tracing.cursor.PageCursorTracerSupplier_Fields.Null); config.AugmentDefaults(GraphDatabaseSettings.pagecache_memory, "8M"); FormattedLogProvider logProvider = FormattedLogProvider.toOutputStream(System.err); InitializeJobScheduler(); ConfiguringPageCacheFactory pageCacheFactory = new ConfiguringPageCacheFactory(fs, config, tracer, cursorTracerSupplier, logProvider.GetLog(typeof(PageCache)), EmptyVersionContextSupplier.EMPTY, JobScheduler); return(pageCacheFactory.OrCreatePageCache); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @Override @Nonnull public org.neo4j.commandline.admin.AdminCommand create(java.nio.file.Path homeDir, java.nio.file.Path configDir, org.neo4j.commandline.admin.OutsideWorld outsideWorld) public override AdminCommand Create(Path homeDir, Path configDir, OutsideWorld outsideWorld) { bool debug = System.getenv().get("NEO4J_DEBUG") != null; LogProvider logProvider = FormattedLogProvider.withDefaultLogLevel(debug ? Level.DEBUG : Level.NONE).toOutputStream(outsideWorld.OutStream()); Monitors monitors = new Monitors(); OnlineBackupContextFactory contextBuilder = new OnlineBackupContextFactory(homeDir, configDir); BackupModule backupModule = new BackupModule(outsideWorld, logProvider, monitors); BackupSupportingClassesFactoryProvider classesFactoryProvider = ProvidersByPriority.findFirst().orElseThrow(NoProviderException()); BackupSupportingClassesFactory supportingClassesFactory = classesFactoryProvider.GetFactory(backupModule); BackupStrategyCoordinatorFactory coordinatorFactory = new BackupStrategyCoordinatorFactory(backupModule); return(new OnlineBackupCommand(outsideWorld, contextBuilder, supportingClassesFactory, coordinatorFactory)); }
private static Server CreateServer() { return(new Server(_channel => { }, FormattedLogProvider.withDefaultLogLevel(Level.DEBUG).toOutputStream(System.out), FormattedLogProvider.withDefaultLogLevel(Level.DEBUG).toOutputStream(System.out), new ListenSocketAddress("localhost", PortAuthority.allocatePort()), "serverName")); }
//JAVA TO C# CONVERTER TODO TASK: Most Java annotations will not have direct .NET equivalent attributes: //ORIGINAL LINE: @BeforeClass public static void setupServer() throws java.io.IOException //JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#: public static void SetupServer() { @out = new MemoryStream(); _server = ServerHelper.createNonPersistentServer(FormattedLogProvider.toOutputStream(@out)); }
internal BackupOutputMonitor(OutsideWorld outsideWorld) { LogProvider stdOutLogProvider = FormattedLogProvider.toOutputStream(outsideWorld.OutStream()); _log = stdOutLogProvider.GetLog(typeof(BackupOutputMonitor)); }