org.apache.commons.monitoring.reporting.web.plugin.report.format
Enum MetricData
java.lang.Object
java.lang.Enum<MetricData>
org.apache.commons.monitoring.reporting.web.plugin.report.format.MetricData
- All Implemented Interfaces:
- Serializable, Comparable<MetricData>
public enum MetricData
- extends Enum<MetricData>
An enum to acces data from a Counter based on the property name. Can be used to avoid reflection on Counter
implementation when requesting data and undesirable exposure of internals.
example :
String property = httpServletRequest.getParameter( "property" );
Double data = MetricData.valueOf( property ).value( metric );
- Author:
- Nicolas De Loof
Method Summary |
abstract boolean |
isTime()
|
abstract double |
value(Counter counter)
|
static MetricData |
valueOf(String name)
Returns the enum constant of this type with the specified name. |
static MetricData[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared. |
Hits
public static final MetricData Hits
Max
public static final MetricData Max
Mean
public static final MetricData Mean
Min
public static final MetricData Min
StandardDeviation
public static final MetricData StandardDeviation
Sum
public static final MetricData Sum
SumOfLogs
public static final MetricData SumOfLogs
SumOfSquares
public static final MetricData SumOfSquares
Variance
public static final MetricData Variance
GeometricMean
public static final MetricData GeometricMean
Value
public static final MetricData Value
Concurrency
public static final MetricData Concurrency
MaxConcurrency
public static final MetricData MaxConcurrency
values
public static MetricData[] values()
- Returns an array containing the constants of this enum type, in
the order they are declared. This method may be used to iterate
over the constants as follows:
for (MetricData c : MetricData.values())
System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in
the order they are declared
valueOf
public static MetricData valueOf(String name)
- Returns the enum constant of this type with the specified name.
The string must match exactly an identifier used to declare an
enum constant in this type. (Extraneous whitespace characters are
not permitted.)
- Parameters:
name
- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant
with the specified name
NullPointerException
- if the argument is null
value
public abstract double value(Counter counter)
isTime
public abstract boolean isTime()
Copyright © 2008–2013 The Apache Software Foundation. All rights reserved.