public class ControlledMetricRatio extends BaseControlledMetric<ControlledMetricRatio.NumeratorDenominator,ControlledMetricRatio.RatioValue>
Modifier and Type | Class and Description |
---|---|
static class |
ControlledMetricRatio.NumeratorDenominator
Class which holds a numerator and denominator double.
|
static class |
ControlledMetricRatio.RatioValue
Wrapper around a numerator and denominator.
|
ControlledMetric.AggregationType
Constructor and Description |
---|
ControlledMetricRatio(String component,
String module,
String name,
String description,
String unit) |
Modifier and Type | Method and Description |
---|---|
void |
adjustValue(Number numerator,
Number denominator)
Adjust the value of our numerator and denominator to set new values for it.
|
ControlledMetricRatio.RatioValue |
createInitialValue()
Create the initial value for our metric.
|
ControlledMetric.AggregationType |
getAggregationType()
Returns the type of aggregation used by this metric.
|
ControlledMetricRatio.NumeratorDenominator |
makeValueFromLong(long value)
Make a value type from long input.
|
ControlledMetricRatio.NumeratorDenominator |
makeValueFromNumber(Number number)
Make a value type from Number input.
|
adjustValue, adjustValue, compareTo, equals, getAggregationTypeName, getComponent, getDescription, getJmxBeanName, getJmxDomainName, getJmxFolderNames, getMetricValue, getModule, getName, getUnit, getValue, getValueDetails, getValueDetailsToPersist, getValueToPersist, hashCode, storeValue, toString
public ControlledMetricRatio(String component, String module, String name, String description, String unit)
component
- Component short name such as "web".module
- Module name to identify the part of the component such as "pageview".name
- String label description the metric.description
- Description for more information which may not be persisted.unit
- Unit of the metric.public ControlledMetricRatio.RatioValue createInitialValue()
ControlledMetric
public ControlledMetricRatio.NumeratorDenominator makeValueFromLong(long value)
ControlledMetric
ControlledMetric.adjustValue(long)
method.public ControlledMetricRatio.NumeratorDenominator makeValueFromNumber(Number number)
ControlledMetric
ControlledMetric.adjustValue(Number)
method.public ControlledMetric.AggregationType getAggregationType()
ControlledMetric
public void adjustValue(Number numerator, Number denominator)
ControlledMetricValue
.This content is licensed by Gray Watson under the Creative Commons Attribution-Share Alike 3.0 License.