public class MetricGroupType
extends java.lang.Object
MetricGroup
object.
Each MetricGroupType
must be registered with the
MetricGroupTypeRegistry
.
MetricGroupTypes
may be
defined within the Gateway's configuration store, these MetricGroupTypes
will be automatically registered.
For example, some of the MetricGroupTypes
defined by default are:- Service, Client, TargetServer,
SystemOverview. Please refer to the Vordel documentation for a complete list of
MetricGroupTypes
defined in the Gateway's configuration store.
It is possible via the Metrics API, to create a MetricGroup
whose associated
MetricGroupType
is not defined in the Gateway's configuration store.
Please refer to the MetricGroup
Javadoc for more information.
The MetricGroupType
defines the list of metrics
that may be generated for a MetricGroup
.
A map of MetricType
objects
in the MetricGroupType
object defines this list of metrics.
A MetricGroupType
may have n child MetricGroupTypes
.
For example, the Service MetricGroupType
has a child
MetricGroupType
for each client. In this way it is possible to
generate metrics that are for a service and client combination, e.g. how may
times did client John Smith invoke the service StockQuote.MetricGroup
,
MetricType
Constructor and Description |
---|
MetricGroupType(java.lang.String name)
Construct a
MetricGroupType . |
MetricGroupType(java.lang.String name,
java.util.List<MetricType> metricTypes)
Construct a
MetricGroupType . |
MetricGroupType(java.lang.String name,
java.lang.String[] metricNames)
Construct a
MetricGroupType with a set of named
MetricTypeValue
metric types. |
Modifier and Type | Method and Description |
---|---|
void |
addMetricType(MetricType type)
Add a
MetricType to the MetricGroupType . |
java.util.List<java.lang.String> |
getMetricNames()
Get the names of the metrics that will be generated for the
MetricGroupType . |
MetricType |
getMetricType(java.lang.String name)
Gets a MetricType by name.
|
java.util.Map<java.lang.String,MetricType> |
getMetricTypes()
Get the allowed metrics that are defined for this type of
MetricGroupType . |
java.lang.String |
getName()
Get the name of the
MetricGroupType . |
boolean |
hasMetricType(java.lang.String name)
Checks to see if this
MetricGroupType has the named MetricType
in its list of generated metrics. |
void |
setChildMetricGroupTypes(java.util.List<MetricGroupType> childMetricGroupTypes)
Set the child
MetricGroupTypes . |
void |
setMetricTypes(java.util.Map<java.lang.String,MetricType> types)
Set the allowed metrics that are defined for this type of
MetricGroupType . |
public MetricGroupType(java.lang.String name)
MetricGroupType
.name
- The name of the MetricGroupType
, e.g. Service.public MetricGroupType(java.lang.String name, java.util.List<MetricType> metricTypes)
MetricGroupType
.name
- The name of the MetricGroupType
, e.g. Service.metricTypes
- The metrics that can be generated for this MetricGroupType
.public MetricGroupType(java.lang.String name, java.lang.String[] metricNames)
MetricGroupType
with a set of named
MetricTypeValue
metric types.name
- The name of the MetricGroupType
, e.g. Service.metricNames
- The names of the MetricTypeValue
metrics that can be generated for this MetricGroupType
.
These metrics will have no minimum, maximum, or average values
generated. The values will be reset at the start of each time
window.public java.lang.String getName()
MetricGroupType
.public void addMetricType(MetricType type)
MetricType
to the MetricGroupType
. This
must be done before the MetricGroupType
is registered.type
- The metric typejava.lang.IllegalArgumentException
- If you add a MetricType
whose generated metric names exists already in
another MetricType
.public java.util.Map<java.lang.String,MetricType> getMetricTypes()
MetricGroupType
.public boolean hasMetricType(java.lang.String name)
MetricGroupType
has the named MetricType
in its list of generated metrics.name
- The name of the metric to checkMetricGroupType
can generate the metricpublic MetricType getMetricType(java.lang.String name)
name
- The name of the metric.public void setMetricTypes(java.util.Map<java.lang.String,MetricType> types)
MetricGroupType
. This
must be done before the MetricGroupType
is registered.types
- Map of metrics where the key is the metric namepublic void setChildMetricGroupTypes(java.util.List<MetricGroupType> childMetricGroupTypes)
MetricGroupTypes
.
This must be done before the MetricGroupType
is registered.childMetricGroupTypes
- The child MetricGroupTypes
.public java.util.List<java.lang.String> getMetricNames()
MetricGroupType
.
If the metric has a minimum, maximum, or average metric those names will be
added to the list of metric names.
If the metric is a MetricTypeRangeCount
, the names are those of the
individual ranges not the top-level metric, i.e. respTimeRange1,
respTimeRange2 etc, not respTimeRange.
This documentation and all its contents and graphics, copyright © 1999 - 2011 Vordel