MetricMutableGaugeLong (Hadoop 1.2.1 API)
Date: 2013-07-22

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.hadoop.metrics2.lib
Class MetricMutableGaugeLong

    java.lang.Object
      org.apache.hadoop.metrics2.lib.MetricMutable
          org.apache.hadoop.metrics2.lib.MetricMutableGauge<Long>
              org.apache.hadoop.metrics2.lib.MetricMutableGaugeLong

    public class MetricMutableGaugeLong

extends MetricMutableGauge<Long>

A mutable long gauge

Field Summary

Fields inherited from class org.apache.hadoop.metrics2.lib.MetricMutable
`description, name`

Constructor Summary
`MetricMutableGaugeLong(String name, String description, long initValue)` Construct a mutable long gauge metric

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/snapshot of the metric

Methods inherited from class org.apache.hadoop.metrics2.lib.MetricMutable
`changed, clearChanged, setChanged, snapshot`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### MetricMutableGaugeLong

    public MetricMutableGaugeLong(String name,
                                  String description,
                                  long initValue)

  Construct a mutable long gauge metric

  Parameters:
    `name` - of the gauge
    `description` - of the gauge
    `initValue` - the initial value of the gauge

Method Detail

### incr

    public void incr()

  Description copied from class: `MetricMutableGauge`
  Increment the value of the metric by 1

  Specified by:
    `incr` in class `MetricMutableGauge<Long>`

### incr

    public void incr(long delta)

  Increment by delta

  Parameters:
    `delta` - of the increment

### decr

    public void decr()

  Description copied from class: `MetricMutableGauge`
  Decrement the value of the metric by 1

  Specified by:
    `decr` in class `MetricMutableGauge<Long>`

### 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: `MetricMutable`
  Get a snapshot/snapshot of the metric

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2009 The Apache Software Foundation