org.apache.hadoop.metrics2.lib
Class MutableGaugeLong

java.lang.Object
  extended by org.apache.hadoop.metrics2.lib.MutableMetric
      extended by org.apache.hadoop.metrics2.lib.MutableGauge
          extended by org.apache.hadoop.metrics2.lib.MutableGaugeLong

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class MutableGaugeLong
extends MutableGauge

A mutable long gauge


Method Summary
 void decr()
          Decrement the value of the metric by 1
 void decr(long delta)
          decrement by delta
 void incr()
          Increment the value of the metric by 1
 void incr(long delta)
          Increment by delta
 void set(long value)
          Set the value of the metric
 void snapshot(MetricsRecordBuilder builder, boolean all)
          Get a snapshot of the metric
 long value()
           
 
Methods inherited from class org.apache.hadoop.metrics2.lib.MutableGauge
info
 
Methods inherited from class org.apache.hadoop.metrics2.lib.MutableMetric
changed, clearChanged, setChanged, snapshot
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

value

public long value()

incr

public void incr()
Description copied from class: MutableGauge
Increment the value of the metric by 1

Specified by:
incr in class MutableGauge

incr

public void incr(long delta)
Increment by delta

Parameters:
delta - of the increment

decr

public void decr()
Description copied from class: MutableGauge
Decrement the value of the metric by 1

Specified by:
decr in class MutableGauge

decr

public void decr(long delta)
decrement by delta

Parameters:
delta - of the decrement

set

public void set(long value)
Set the value of the metric

Parameters:
value - to set

snapshot

public void snapshot(MetricsRecordBuilder builder,
                     boolean all)
Description copied from class: MutableMetric
Get a snapshot of the metric

Specified by:
snapshot in class MutableMetric
Parameters:
builder - the metrics record builder
all - if true, snapshot unchanged metrics as well


Copyright © 2014 Apache Software Foundation. All Rights Reserved.