public class MetricExecStatement extends Object implements MetricExec
Constructor and Description |
---|
MetricExecStatement(MetricEventRouter metricEventRouter,
MetricScheduleService metricScheduleService,
long interval,
int statementGroup)
Ctor.
|
Modifier and Type | Method and Description |
---|---|
void |
execute(MetricExecutionContext context)
Execute the production of metric events.
|
long |
getInterval()
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.
|
public MetricExecStatement(MetricEventRouter metricEventRouter, MetricScheduleService metricScheduleService, long interval, int statementGroup)
metricEventRouter
- for routing metric eventsmetricScheduleService
- for scheduling a new executioninterval
- for rescheduling the executionstatementGroup
- group number of statement grouppublic void execute(MetricExecutionContext context)
MetricExec
execute
in interface MetricExec
context
- provides services and schedulingpublic void setInterval(long newInterval)
newInterval
- to setpublic long getInterval()