コード例 #1
0
ファイル: DataCollector.cs プロジェクト: Neo4Net/Neo4Net
 internal DataCollector(Kernel kernel, JobScheduler jobScheduler, Monitors monitors, Org.Neo4j.Values.ValueMapper_JavaMapper valueMapper, Config config)
 {
     this.Kernel         = kernel;
     this.JobScheduler   = jobScheduler;
     this.ValueMapper    = valueMapper;
     this.QueryCollector = new QueryCollector(jobScheduler, config.Get(GraphDatabaseSettings.data_collector_max_recent_query_count), config.Get(GraphDatabaseSettings.data_collector_max_query_text_size));
     try
     {
         this.QueryCollector.collect(Collections.emptyMap());
     }
     catch (InvalidArgumentsException e)
     {
         throw new System.InvalidOperationException("An empty config cannot be invalid", e);
     }
     monitors.AddMonitorListener(QueryCollector);
 }
コード例 #2
0
//JAVA TO C# CONVERTER WARNING: Method 'throws' clauses are not available in C#:
//ORIGINAL LINE: public static AutoCloseable setupDataCollector(org.neo4j.kernel.impl.proc.Procedures procedures, org.neo4j.scheduler.JobScheduler jobScheduler, org.neo4j.internal.kernel.api.Kernel kernel, org.neo4j.kernel.monitoring.Monitors monitors, org.neo4j.values.ValueMapper_JavaMapper valueMapper, org.neo4j.kernel.configuration.Config config) throws org.neo4j.internal.kernel.api.exceptions.KernelException
        public static AutoCloseable SetupDataCollector(Procedures procedures, JobScheduler jobScheduler, Kernel kernel, Monitors monitors, Org.Neo4j.Values.ValueMapper_JavaMapper valueMapper, Config config)
        {
            Preconditions.checkState(kernel != null, "Kernel was null");
            DataCollector dataCollector = new DataCollector(kernel, jobScheduler, monitors, valueMapper, config);

            procedures.RegisterComponent(typeof(DataCollector), ctx => dataCollector, false);
            procedures.RegisterProcedure(typeof(DataCollectorProcedures));
            return(dataCollector);
        }