Class MetricExecStatement

java.lang.Object
com.espertech.esper.common.internal.metrics.stmtmetrics.MetricExecStatement
All Implemented Interfaces:
MetricExec

public class MetricExecStatement extends Object implements MetricExec
Metrics execution producing statement metric events.
  • Constructor Details

    • MetricExecStatement

      public MetricExecStatement(MetricEventRouter metricEventRouter, MetricScheduleService metricScheduleService, long interval, int statementGroup)
      Ctor.
      Parameters:
      metricEventRouter - for routing metric events
      metricScheduleService - for scheduling a new execution
      interval - for rescheduling the execution
      statementGroup - group number of statement group
  • Method Details

    • execute

      public void execute(MetricExecutionContext context)
      Description copied from interface: MetricExec
      Execute the production of metric events.
      Specified by:
      execute in interface MetricExec
      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