Esempio n. 1
0
        public virtual CompositeEventReporter Build()
        {
            CompositeEventReporter reporter = new CompositeEventReporter();
//JAVA TO C# CONVERTER WARNING: The original Java variable was marked 'final':
//ORIGINAL LINE: final String prefix = createMetricsPrefix(config);
            string prefix = CreateMetricsPrefix(_config);

            if (_config.get(csvEnabled))
            {
                CsvOutput csvOutput = new CsvOutput(_config, _registry, _logger, _kernelContext, _fileSystem, _scheduler);
                reporter.Add(csvOutput);
                _life.add(csvOutput);
            }

            if (_config.get(graphiteEnabled))
            {
                HostnamePort   server         = _config.get(graphiteServer);
                long           period         = _config.get(graphiteInterval).toMillis();
                GraphiteOutput graphiteOutput = new GraphiteOutput(server, period, _registry, _logger, prefix);
                reporter.Add(graphiteOutput);
                _life.add(graphiteOutput);
            }

            if (_config.get(prometheusEnabled))
            {
                HostnamePort     server           = _config.get(prometheusEndpoint);
                PrometheusOutput prometheusOutput = new PrometheusOutput(server, _registry, _logger, _portRegister);
                reporter.Add(prometheusOutput);
                _life.add(prometheusOutput);
            }

            return(reporter);
        }
Esempio n. 2
0
 private void InstantiateKernelExtensions()
 {
     _life = new LifeSupport();
     _life.start();
     _labelScanStore = new NativeLabelScanStore(_pageCache, _databaseLayout, _fileSystem, Org.Neo4j.Kernel.Impl.Api.scan.FullStoreChangeStream_Fields.Empty, false, new Monitors(), RecoveryCleanupWorkCollector.immediate());
     _life.add(_labelScanStore);
 }
Esempio n. 3
0
        private SegmentedRaftLog CreateRaftLog(long rotateAtSize, string pruneStrategy)
        {
            if (_fileSystem == null)
            {
                _fileSystem = new EphemeralFileSystemAbstraction();
            }

            File directory = new File(RAFT_LOG_DIRECTORY_NAME);

            _fileSystem.mkdir(directory);

            LogProvider            logProvider     = Instance;
            CoreLogPruningStrategy pruningStrategy = (new CoreLogPruningStrategyFactory(pruneStrategy, logProvider)).NewInstance();
            SegmentedRaftLog       newRaftLog      = new SegmentedRaftLog(_fileSystem, directory, rotateAtSize, new DummyRaftableContentSerializer(), logProvider, 8, Clocks.systemClock(), new OnDemandJobScheduler(), pruningStrategy);

            _life.add(newRaftLog);
            _life.init();
            _life.start();

            return(newRaftLog);
        }