Class MetricExecStatement
java.lang.Object
com.espertech.esper.common.internal.metrics.stmtmetrics.MetricExecStatement
- All Implemented Interfaces:
MetricExec
Metrics execution producing statement metric events.
-
Constructor Summary
ConstructorDescriptionMetricExecStatement
(MetricEventRouter metricEventRouter, MetricScheduleService metricScheduleService, long interval, int statementGroup) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
execute
(MetricExecutionContext context) Execute the production of metric events.long
Returns reporting interval.void
setInterval
(long newInterval) Set a new interval, cancels the existing schedule, re-establishes the new schedule if the interval is a positive number.
-
Constructor Details
-
MetricExecStatement
public MetricExecStatement(MetricEventRouter metricEventRouter, MetricScheduleService metricScheduleService, long interval, int statementGroup) Ctor.- Parameters:
metricEventRouter
- for routing metric eventsmetricScheduleService
- for scheduling a new executioninterval
- for rescheduling the executionstatementGroup
- group number of statement group
-
-
Method Details
-
execute
Description copied from interface:MetricExec
Execute the production of metric events.- Specified by:
execute
in interfaceMetricExec
- Parameters:
context
- provides services and scheduling
-
setInterval
public void setInterval(long newInterval) Set a new interval, cancels the existing schedule, re-establishes the new schedule if the interval is a positive number.- Parameters:
newInterval
- to set
-
getInterval
public long getInterval()Returns reporting interval.- Returns:
- reporting interval
-