|
Sonic Management API | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sonicsw.mf.common.metrics.MetricsFactory
public final class MetricsFactory
Component developers are required to use the factory to create instances of implementations of the core metrics interfaces (of this pakage). The exception to this rule is that component developers can create their own IMetricsManager implementation - however the preferred model is to use the default manager provided by this factory.
Constructor Summary | |
---|---|
MetricsFactory()
|
Method Summary | |
---|---|
static IAlert |
createAlert(IMetricIdentity metricId,
boolean isHighThreshold,
long threshold)
Creates an Alert object |
static IAlert[] |
createAlerts(IMetricIdentity metricId,
boolean isHighThreshold,
java.lang.String thresholds)
Creates an array of Alert objects from a comma delimited threshold string |
static IMetric |
createMetric(IMetricIdentity id,
long value,
long currencyTimestamp)
Returns a metric that encapsulates the metric identity and its value. |
static IAggregateMetric |
createMetric(java.lang.String[] sources,
IMetricIdentity id,
long[] values,
long currencyTimestamp)
Returns an aggregate metric that encapsulates the metric identity, its aggregate values and the sources that contributed to the aggregated value of the metric. |
static IHistoricalMetric |
createMetric(java.lang.String source,
IMetric metric)
Returns a historical metric that encapsulates the metric identity, its value and the source of the metric. |
static IMetricIdentity |
createMetricIdentity(IMetricIdentity parentID,
java.lang.String nameComponent)
Returns a metric identity. |
static IMetricIdentity |
createMetricIdentity(java.lang.String absoluteName)
Returns a metric identity. |
static IMetricIdentity |
createMetricIdentity(java.lang.String[] nameComponents)
Returns a metric identity. |
static IMetricInfo |
createMetricInfo(IMetricIdentity id,
short valueType,
java.lang.String description,
java.lang.String extendedDataData,
boolean isInstanceMetric,
boolean isDynamic)
Returns a info object that encapsulates the meta-data pertaining to an individual metric or instance metric. |
static IMetricInfo |
createMetricInfo(IMetricIdentity id,
short valueType,
java.lang.String description,
java.lang.String extendedDataData,
boolean isInstanceMetric,
boolean isDynamic,
boolean supportsHighAlerts,
boolean supportsLowAlerts,
java.lang.String units)
Returns a info object that encapsulates the meta-data pertaining to an individual metric or instance metric. |
static IAggregateMetricsData |
createMetricsData(IAggregateMetric[] metrics,
long currencyTimestamp)
Returns an aggregate metrics data object that encapsulates the given aggregrate metrics. |
static IMetricsData |
createMetricsData(IMetric[] metrics,
long currencyTimestamp)
Returns a metrics data object that encapsulates the given metrics. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetricsFactory()
Method Detail |
---|
public static IAlert createAlert(IMetricIdentity metricId, boolean isHighThreshold, long threshold)
IMetricIdentity
- id The metric id this alert is associated withisHighThreshold
- Whether this is a high or low thresholdthreshold
- The threshold to set the alert topublic static IAlert[] createAlerts(IMetricIdentity metricId, boolean isHighThreshold, java.lang.String thresholds)
IMetricIdentity
- id The metric id these alert are associated withisHighThreshold
- Whether these are high or low thresholdsthreshold
- A comma delimited list of threshold valuespublic static IMetric createMetric(IMetricIdentity id, long value, long currencyTimestamp)
public static IAggregateMetric createMetric(java.lang.String[] sources, IMetricIdentity id, long[] values, long currencyTimestamp)
public static IHistoricalMetric createMetric(java.lang.String source, IMetric metric)
public static IMetricIdentity createMetricIdentity(IMetricIdentity parentID, java.lang.String nameComponent)
parentID
- The metric identity of the parent.nameComponent
- The name component of the child of the parent. Special characters '.'
and '\' are treated as part of the name component rather than as further
delimiting.public static IMetricIdentity createMetricIdentity(java.lang.String absoluteName)
absoluteName
- An a period '.' delimited string that describe the path of the metric in
in the components tree of metrics (each token representing a component
of the metric name). If a component of a metric name contains periods '.'
or percents '%' then those should be escaped by a percent e.g. "%."public static IMetricIdentity createMetricIdentity(java.lang.String[] nameComponents)
nameCompnents
- An array of strings that describe the path of the metric in
in the components tree of metrics.public static IMetricInfo createMetricInfo(IMetricIdentity id, short valueType, java.lang.String description, java.lang.String extendedDataData, boolean isInstanceMetric, boolean isDynamic)
createMetricInfo(IMetricIdentity, short, String, String, boolean, boolean, boolean, boolean, String)
public static IMetricInfo createMetricInfo(IMetricIdentity id, short valueType, java.lang.String description, java.lang.String extendedDataData, boolean isInstanceMetric, boolean isDynamic, boolean supportsHighAlerts, boolean supportsLowAlerts, java.lang.String units)
id
- The metric identity.valueType
- The metric value type (see IValueType defined types).description
- The optional free form description of the metric.extendedDataData
- The optional free form data associated with the metric.isInstanceMetric
- Indicates the meta-data describes metrics that are parented by the instance metric.isDynamic
- Indicates the metric can be enabled/disabled at runtime.supportsHighAlerts
- Indicates the metric supports high threshold alerts.supportsLowAlerts
- Indicates the metric supports low threshold alerts.units
- The units that this metric uses.createMetricInfo(IMetricIdentity, short, String, String, boolean, boolean)
,
IValueType
public static IAggregateMetricsData createMetricsData(IAggregateMetric[] metrics, long currencyTimestamp)
public static IMetricsData createMetricsData(IMetric[] metrics, long currencyTimestamp)
|
Sonic Management API | |||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |