org.apache.hadoop.metrics2.lib
Class MutableCounterLong

java.lang.Object
  extended by org.apache.hadoop.metrics2.lib.MutableMetric
      extended by org.apache.hadoop.metrics2.lib.MutableCounter
          extended by org.apache.hadoop.metrics2.lib.MutableCounterLong

@InterfaceAudience.Public
@InterfaceStability.Evolving
public class MutableCounterLong
extends MutableCounter

A mutable long counter


Method Summary
 void incr()
          Increment the metric value by 1.
 void incr(long delta)
          Increment the value by a delta
 void snapshot(MetricsRecordBuilder builder, boolean all)
          Get a snapshot of the metric
 long value()
           
 
Methods inherited from class org.apache.hadoop.metrics2.lib.MutableCounter
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

incr

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

Specified by:
incr in class MutableCounter

incr

public void incr(long delta)
Increment the value by a delta

Parameters:
delta - of the increment

value

public long value()

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.