コード例 #1
0
        /// <summary>
        ///     Ctor.
        /// </summary>
        /// <param name="specification">configuration</param>
        /// <param name="runtimeURI">runtime URI</param>
        /// <param name="rwLockManager">the read-write lock manager</param>
        public MetricReportingServiceImpl(
            ConfigurationRuntimeMetricsReporting specification,
            string runtimeURI,
            IReaderWriterLockManager rwLockManager)
        {
            this.specification = specification;
            this.runtimeURI = runtimeURI;
            if (!specification.IsEnableMetricsReporting) {
                schedule = null;
                stmtMetricRepository = null;
                statementMetricHandles = null;
                metricsExecutor = null;
                return;
            }

            if (specification.IsEnableMetricsReporting) {
                //MetricUtil.Initialize();
            }

            schedule = new MetricScheduleService();

            stmtMetricRepository = new StatementMetricRepository(runtimeURI, specification, rwLockManager);
            statementGroupExecutions = new LinkedHashMap<string, MetricExecStatement>();
            statementMetricHandles = new Dictionary<DeploymentIdNamePair, StatementMetricHandle>();
            StatementOutputHooks = new CopyOnWriteArraySet<MetricsStatementResultListener>();

            if (specification.IsThreading) {
                metricsExecutor = new MetricsExecutorThreaded(runtimeURI);
            }
            else {
                metricsExecutor = new MetricsExecutorUnthreaded();
            }
        }
コード例 #2
0
ファイル: MetricExecStatement.cs プロジェクト: lanicon/nesper
 /// <summary>
 ///     Ctor.
 /// </summary>
 /// <param name="metricEventRouter">for routing metric events</param>
 /// <param name="metricScheduleService">for scheduling a new execution</param>
 /// <param name="interval">for rescheduling the execution</param>
 /// <param name="statementGroup">group number of statement group</param>
 public MetricExecStatement(
     MetricEventRouter metricEventRouter,
     MetricScheduleService metricScheduleService,
     long interval,
     int statementGroup)
 {
     this._metricEventRouter = metricEventRouter;
     this._metricScheduleService = metricScheduleService;
     this._interval = interval;
     this._statementGroup = statementGroup;
 }