Class MetricReportingServiceImpl
java.lang.Object
com.espertech.esper.runtime.internal.metrics.stmtmetrics.MetricReportingServiceImpl
- All Implemented Interfaces:
com.espertech.esper.common.internal.metrics.stmtmetrics.MetricEventRouter
,com.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
,DeploymentStateListener
,MetricReportingServiceSPI
public class MetricReportingServiceImpl
extends Object
implements MetricReportingServiceSPI, com.espertech.esper.common.internal.metrics.stmtmetrics.MetricEventRouter, DeploymentStateListener
Metrics reporting.
Reports for all statements even if not in a statement group, i.e. statement in default group.
-
Constructor Summary
ConstructorDescriptionMetricReportingServiceImpl
(com.espertech.esper.common.client.configuration.runtime.ConfigurationRuntimeMetricsReporting specification, String runtimeURI) Ctor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
accountOutput
(com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricHandle handle, int numIStream, int numRStream, Object epStatement, Object runtime) void
accountTime
(com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricHandle metricsHandle, long deltaCPU, long deltaWall, int numInputEvents) void
Add stmt result listener.void
destroy()
com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricHandle
getStatementHandle
(int statementId, String deploymentId, String statementName) Returns output hooks.boolean
void
iterateMetrics
(Consumer<com.espertech.esper.common.client.metric.EPMetricsStatementGroup> consumer) void
Called when a deployment completedvoid
Called when an undeployment completedvoid
processTimeEvent
(long timeEventTime) void
Remove stmt result listener.void
route
(com.espertech.esper.common.client.metric.MetricEvent metricEvent) void
setContext
(com.espertech.esper.common.internal.filtersvc.FilterService filterService, com.espertech.esper.common.internal.schedule.SchedulingService schedulingService, com.espertech.esper.common.internal.event.core.EventServiceSendEventCommon eventServiceSendEventInternal) void
void
void
setMetricsReportingInterval
(String stmtGroupName, long newInterval) void
setMetricsReportingStmtDisabled
(String deploymentId, String statementName) void
setMetricsReportingStmtEnabled
(String deploymentId, String statementName)
-
Constructor Details
-
MetricReportingServiceImpl
public MetricReportingServiceImpl(com.espertech.esper.common.client.configuration.runtime.ConfigurationRuntimeMetricsReporting specification, String runtimeURI) Ctor.- Parameters:
specification
- configurationruntimeURI
- runtime URI
-
-
Method Details
-
isMetricsReportingEnabled
public boolean isMetricsReportingEnabled()- Specified by:
isMetricsReportingEnabled
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
addStatementResultListener
Description copied from interface:MetricReportingServiceSPI
Add stmt result listener.- Specified by:
addStatementResultListener
in interfaceMetricReportingServiceSPI
- Parameters:
listener
- to add
-
removeStatementResultListener
Description copied from interface:MetricReportingServiceSPI
Remove stmt result listener.- Specified by:
removeStatementResultListener
in interfaceMetricReportingServiceSPI
- Parameters:
listener
- to remove
-
getStatementOutputHooks
Description copied from interface:MetricReportingServiceSPI
Returns output hooks.- Specified by:
getStatementOutputHooks
in interfaceMetricReportingServiceSPI
- Returns:
- hooks.
-
setContext
public void setContext(com.espertech.esper.common.internal.filtersvc.FilterService filterService, com.espertech.esper.common.internal.schedule.SchedulingService schedulingService, com.espertech.esper.common.internal.event.core.EventServiceSendEventCommon eventServiceSendEventInternal) - Specified by:
setContext
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
processTimeEvent
public void processTimeEvent(long timeEventTime) - Specified by:
processTimeEvent
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
iterateMetrics
public void iterateMetrics(Consumer<com.espertech.esper.common.client.metric.EPMetricsStatementGroup> consumer) - Specified by:
iterateMetrics
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
destroy
public void destroy()- Specified by:
destroy
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
route
public void route(com.espertech.esper.common.client.metric.MetricEvent metricEvent) - Specified by:
route
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricEventRouter
-
accountTime
public void accountTime(com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricHandle metricsHandle, long deltaCPU, long deltaWall, int numInputEvents) - Specified by:
accountTime
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
accountOutput
public void accountOutput(com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricHandle handle, int numIStream, int numRStream, Object epStatement, Object runtime) - Specified by:
accountOutput
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
getStatementHandle
public com.espertech.esper.common.internal.metrics.stmtmetrics.StatementMetricHandle getStatementHandle(int statementId, String deploymentId, String statementName) - Specified by:
getStatementHandle
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
onDeployment
Description copied from interface:DeploymentStateListener
Called when a deployment completed- Specified by:
onDeployment
in interfaceDeploymentStateListener
- Parameters:
event
- deployment information
-
onUndeployment
Description copied from interface:DeploymentStateListener
Called when an undeployment completed- Specified by:
onUndeployment
in interfaceDeploymentStateListener
- Parameters:
event
- undeployment information
-
setMetricsReportingInterval
- Specified by:
setMetricsReportingInterval
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
setMetricsReportingStmtDisabled
- Specified by:
setMetricsReportingStmtDisabled
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
setMetricsReportingStmtEnabled
- Specified by:
setMetricsReportingStmtEnabled
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
setMetricsReportingEnabled
public void setMetricsReportingEnabled()- Specified by:
setMetricsReportingEnabled
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-
setMetricsReportingDisabled
public void setMetricsReportingDisabled()- Specified by:
setMetricsReportingDisabled
in interfacecom.espertech.esper.common.internal.metrics.stmtmetrics.MetricReportingService
-