public interface MetricsConfiguration
Title: Open Service Framework
Description: This interface defines a mechanism for configuring Service metrics in the Metric Registry
.
Metrics are confgured by the
A Service that has been configured to produce Metrics
will attempt to register
the metrics with
the Service component context. The component will use its Metrics Factory
to initialize the runtime metric
objects. Users must use the runtime API to populate the runtime metrics. Note that the Metric Factory
and it's
support indicators are intialized at Service start-up by the Container Context
.
Copyright: Copyright (c) 2008
Company: StreamScape Technologies
Modifier and Type | Method and Description |
---|---|
void |
addMetric(MetricDefinition metric)
This method adds a
Metric to the Service Configuration. |
boolean |
existsMetric(java.lang.String metricName)
Retuns
true if this metric is registered in the Service Configuration. |
MetricDefinition |
getMetric(java.lang.String metricName)
Returns the specific
Metric instance for this Service Configuration. |
java.util.List |
getMetrics()
Returns an
Enumeration of Metric instances. |
boolean |
hasMetrics()
Retuns
true if this Service Configuration has metrics defined. |
java.util.List |
listMetrics()
Lists metrics for this service type.
|
void |
removeAllMetrics()
Removes all
Metric definitions from this Service Configuration. |
void |
removeMetric(java.lang.String metricName)
Removes a
Metric from the Service Configuration. |
void addMetric(MetricDefinition metric) throws ServiceConfigurationException
Metric
to the Service Configuration. Besides having a name and a description, all metrics allow users
to set minimum and maximum threshold values. A threshold may be used to denote a limit or a range (by setting the maximum and minimum).
It also offers the option to emit a State Notification
whe a threshold is crossed. The actual implementation is left up to
the implementer of the MetricsFactory
interface.metric
- MetricDefinitionServiceConfigurationException
- If a problem occurs when adding the metric.void removeMetric(java.lang.String metricName) throws ServiceConfigurationException
Metric
from the Service Configuration.metricName
- String Name of the Metric.ServiceConfigurationException
- If the metric being removed is not found.MetricDefinition getMetric(java.lang.String metricName) throws ServiceConfigurationException
Metric
instance for this Service Configuration.metricName
- String Name of Metric.ServiceConfigurationException
- If there is a problem or if the metric does nto exist.java.util.List getMetrics()
Enumeration
of Metric instances.java.util.List listMetrics()
void removeAllMetrics()
Metric
definitions from this Service Configuration.boolean hasMetrics()
true
if this Service Configuration has metrics defined.boolean existsMetric(java.lang.String metricName)
true
if this metric is registered in the Service Configuration.metricName
- StringCopyright © 2015-2024 StreamScape Technologies. All rights reserved.