com.espertech.esper.metrics.codahale_metrics.metrics.util
Class RatioGauge

java.lang.Object
  extended by com.espertech.esper.metrics.codahale_metrics.metrics.core.Gauge<java.lang.Double>
      extended by com.espertech.esper.metrics.codahale_metrics.metrics.util.RatioGauge
All Implemented Interfaces:
Metric
Direct Known Subclasses:
PercentGauge

public abstract class RatioGauge
extends Gauge<java.lang.Double>

A gauge which measures the ratio of one value to another.

If the denominator is zero, not a number, or infinite, the resulting ratio is not a number.


Constructor Summary
RatioGauge()
           
 
Method Summary
protected abstract  double getDenominator()
          Returns the denominator (the value on the bottom half of the fraction or the right-hand side of the ratio).
protected abstract  double getNumerator()
          Returns the numerator (the value on the top half of the fraction or the left-hand side of the ratio).
 java.lang.Double value()
          Returns the metric's current value.
 
Methods inherited from class com.espertech.esper.metrics.codahale_metrics.metrics.core.Gauge
processWith
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RatioGauge

public RatioGauge()
Method Detail

getNumerator

protected abstract double getNumerator()
Returns the numerator (the value on the top half of the fraction or the left-hand side of the ratio).

Returns:
the numerator

getDenominator

protected abstract double getDenominator()
Returns the denominator (the value on the bottom half of the fraction or the right-hand side of the ratio).

Returns:
the denominator

value

public java.lang.Double value()
Description copied from class: Gauge
Returns the metric's current value.

Specified by:
value in class Gauge<java.lang.Double>
Returns:
the metric's current value

© 2006-2015 EsperTech Inc.
All rights reserved.
Visit us at espertech.com