Package com.ibm.wsspi.usage.metering
Class MetricCapDescriptor
- java.lang.Object
-
- com.ibm.wsspi.usage.metering.MetricCapDescriptor
-
public class MetricCapDescriptor extends java.lang.Object
Provides descriptive information that controls the monthly aggregation algorithm used by the metering service for calculating either hourly or peak values for a metric.A MetricCapDescriptor is only used for reporting purposes when the associated product has been identified as the primary product; see
ProductExtension.getProductWeight()
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CAP_ALGORITHM_CONCURRENT
Metric capping attribute name to use the concurrent total capping algorithm.static java.lang.String
CAP_ALGORITHM_CONCURRENT_MAX
Metric capping attribute name to use the concurrent maximum capping algorithm.static java.lang.String
CAP_ALGORITHM_SHARED
Metric capping attribute name to use the shared total capping algorithm.
-
Constructor Summary
Constructors Constructor Description MetricCapDescriptor(java.lang.String capMetricType, java.lang.Number cap)
Constructs aMetricCapDescriptor
with all required descriptor attributes.MetricCapDescriptor(java.lang.String capMetricType, java.lang.Number cap, java.lang.String capAlgorithm, java.lang.String capGroupId)
Constructs aMetricCapDescriptor
with all available descriptor attributes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.Number
getCap()
Returns the maximum time in milliseconds per month that will be included for the cap metric type in the monthly report.java.lang.String
getCapAlgorithm()
Returns the cap algorithm which is used to aggregate the capped metric value.java.lang.String
getCapGroupId()
Returns the group identifier to which the capping algorithm will be applied; null indicates the capping algorithm will be applied to the registered instance.java.lang.String
getCapMetricType()
Returns the metric type to be aggregated by the metering service in the monthly report.java.lang.String
toString()
-
-
-
Field Detail
-
CAP_ALGORITHM_CONCURRENT
public static final java.lang.String CAP_ALGORITHM_CONCURRENT
Metric capping attribute name to use the concurrent total capping algorithm.- See Also:
- Constant Field Values
-
CAP_ALGORITHM_SHARED
public static final java.lang.String CAP_ALGORITHM_SHARED
Metric capping attribute name to use the shared total capping algorithm.- See Also:
- Constant Field Values
-
CAP_ALGORITHM_CONCURRENT_MAX
public static final java.lang.String CAP_ALGORITHM_CONCURRENT_MAX
Metric capping attribute name to use the concurrent maximum capping algorithm.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
MetricCapDescriptor
public MetricCapDescriptor(java.lang.String capMetricType, java.lang.Number cap)
Constructs aMetricCapDescriptor
with all required descriptor attributes.A MetricCapDescriptor must provide the following attributes:
- capMetricType - the metric type that will be aggregated in the monthly report. This value must correspond
to the value returned by
Metric.getMetricType()
, and may be for a metric provided by WebSphere or any of the other included products. The following constants are for the core metric types provided by WebSphere :Metric.TYPE_PROCESSOR_CORES
,Metric.TYPE_CPU_TIME
,Metric.TYPE_JAVA_INIT_MEMORY
,Metric.TYPE_JAVA_USED_MEMORY
,Metric.TYPE_JAVA_COMMITTED_MEMORY
,Metric.TYPE_JAVA_MAX_MEMORY
,Metric.TYPE_JAVA_MEMORY_AFTER_GC
,Metric.TYPE_SERVLET_REQUESTS
,Metric.TYPE_TOTAL_PHYSICAL_MEMORY
. - cap - The maximum time in milliseconds per month that will be included for the capMetricType for the monthly report.
- Parameters:
capMetricType
- the metric type that will be aggregated by the metering service in the monthly reportcap
- The maximum time in milliseconds per month that will be included for the capMetricType for the monthly report
- capMetricType - the metric type that will be aggregated in the monthly report. This value must correspond
to the value returned by
-
MetricCapDescriptor
public MetricCapDescriptor(java.lang.String capMetricType, java.lang.Number cap, java.lang.String capAlgorithm, java.lang.String capGroupId)
Constructs aMetricCapDescriptor
with all available descriptor attributes.A MetricCapDescriptor may provide the following attributes:
- capMetricType - the metric type that will be aggregated in the monthly report (required). This value must
correspond to the value returned by
Metric.getMetricType()
, and may be for a metric provided by WebSphere or any of the other included products. The following constants are for the core metric types provided by WebSphere :Metric.TYPE_PROCESSOR_CORES
,Metric.TYPE_CPU_TIME
,Metric.TYPE_JAVA_INIT_MEMORY
,Metric.TYPE_JAVA_USED_MEMORY
,Metric.TYPE_JAVA_COMMITTED_MEMORY
,Metric.TYPE_JAVA_MAX_MEMORY
,Metric.TYPE_JAVA_MEMORY_AFTER_GC
,Metric.TYPE_SERVLET_REQUESTS
,Metric.TYPE_TOTAL_PHYSICAL_MEMORY
. - cap - The maximum time in milliseconds per month that will be included for the capMetricType for the monthly report (required).
- capAlgorithm - the algorithm used by the metering service for the metric in the monthly report (required). The available algorithms are : concurrent_duration_cap, shared_duration_cap, and concurrent_max_cap.
- capGroup - the group to which the capping algorithm will be applied; null indicates the capping algorithm
will be applied to the registered instance. If a cap group identifier is provided, the instance must be included
in that group as determined by
ProductExtension.getGroups(java.util.List<com.ibm.wsspi.usage.metering.Group>)
.
- Parameters:
capMetricType
- the metric type that will be aggregated by the metering service in the monthly reportcap
- the maximum time in milliseconds per month that will be included for the capMetricType for the monthly reportcapAlgorithm
- the algorithm used by the metering service for the metric in the monthly reportcapGroupId
- the group identifier to which the capping algorithm will be applied; null indicates the capping algorithm will be applied to the registered instance.
- capMetricType - the metric type that will be aggregated in the monthly report (required). This value must
correspond to the value returned by
-
-
Method Detail
-
getCapMetricType
public java.lang.String getCapMetricType()
Returns the metric type to be aggregated by the metering service in the monthly report.- Returns:
- the cap metric type
-
getCap
public java.lang.Number getCap()
Returns the maximum time in milliseconds per month that will be included for the cap metric type in the monthly report.- Returns:
- the cap
-
getCapAlgorithm
public java.lang.String getCapAlgorithm()
Returns the cap algorithm which is used to aggregate the capped metric value.- Returns:
- the cap algorithm
-
getCapGroupId
public java.lang.String getCapGroupId()
Returns the group identifier to which the capping algorithm will be applied; null indicates the capping algorithm will be applied to the registered instance.- Returns:
- the cap group identifier
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-