com.espertech.esper.epl.metric
Class MetricExecStatement

java.lang.Object
  extended by com.espertech.esper.epl.metric.MetricExecStatement
All Implemented Interfaces:
MetricExec

public class MetricExecStatement
extends java.lang.Object
implements MetricExec

Metrics execution producing statement metric events.


Constructor Summary
MetricExecStatement(MetricEventRouter metricEventRouter, MetricScheduleService metricScheduleService, long interval, int statementGroup)
          Ctor.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

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 Detail

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

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com