public class ServiceMetricsFactory extends java.lang.Object implements MetricsFactory, MetricThresholdListener
Title: Open Service Framework
Description:
Copyright: Copyright (c) 2010
Company: StreamScape Technologies
Constructor and Description |
---|
ServiceMetricsFactory(ServiceContext serviceContext) |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroys metrics.
|
Metric |
getMetric(java.lang.String metricName)
Returns a read-only interface of the runtime metric.
|
long |
getMetricValue(java.lang.String metricName)
Gets the Metric value.
|
java.util.List |
listMetricNames()
Returns a list of registered metric names.
|
void |
nextMetricValue(java.lang.String metricName)
Auto increments the metric value by the increment interval.
|
void |
onThreshold(java.lang.String metric) |
void |
priorMetricValue(java.lang.String metricName)
Auto decrements the metric value by the increment interval.
|
void |
raiseMetricAdvisory(java.lang.String metricName)
Raises an advisory that contains the most recent Metric value.
|
void |
resetMetrics()
Resets the values of the metrics.
|
void |
setMetricValue(java.lang.String metricName,
long metricValue)
Sets the metric value.
|
public ServiceMetricsFactory(ServiceContext serviceContext)
public void destroy()
public java.util.List listMetricNames()
listMetricNames
in interface MetricsFactory
public long getMetricValue(java.lang.String metricName) throws MetricsFactoryException
getMetricValue
in interface MetricsFactory
metricName
- String The Metric nameMFactoryException
MetricsFactoryException
public void resetMetrics()
resetMetrics
in interface MetricsFactory
MetricsFactoryException
public void setMetricValue(java.lang.String metricName, long metricValue) throws MetricsFactoryException
setMetricValue
in interface MetricsFactory
metricName
- StringmetricValue
- longMetricsFactoryException
public void nextMetricValue(java.lang.String metricName) throws MetricsFactoryException
nextMetricValue
in interface MetricsFactory
metricName
- StringMetricsFactoryException
public void priorMetricValue(java.lang.String metricName) throws MetricsFactoryException
priorMetricValue
in interface MetricsFactory
metricName
- StringMetricsFactoryException
public Metric getMetric(java.lang.String metricName) throws MetricsFactoryException
getMetric
in interface MetricsFactory
metricName
- StringMetricsFactoryException
public void raiseMetricAdvisory(java.lang.String metricName) throws MetricsFactoryException, FabricEventSourceException, FabricUnboundEventException, FabricEventException
MetricsFactory
raiseMetricAdvisory
in interface MetricsFactory
metricName
- StringMetricsFactoryException
FabricEventSourceException
FabricUnboundEventException
FabricEventException
public void onThreshold(java.lang.String metric)
onThreshold
in interface MetricThresholdListener
Copyright © 2015-2024 StreamScape Technologies. All rights reserved.