com.yammer.metrics.util
Class ToggleGauge

java.lang.Object
  extended by com.yammer.metrics.core.Gauge<Integer>
      extended by com.yammer.metrics.util.ToggleGauge
All Implemented Interfaces:
Metric

public class ToggleGauge
extends Gauge<Integer>

Returns a 1 the first time it's called, a 0 every time after that.


Constructor Summary
ToggleGauge()
           
 
Method Summary
 Integer value()
          Returns the metric's current value.
 
Methods inherited from class com.yammer.metrics.core.Gauge
processWith
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ToggleGauge

public ToggleGauge()
Method Detail

value

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

Specified by:
value in class Gauge<Integer>
Returns:
the metric's current value


Copyright © 2012. All Rights Reserved.