|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.hadoop.metrics.util.MetricsLongValue
public class MetricsLongValue
The MetricsLongValue class is for a metric that is not time varied but changes only when it is set. Each time its value is set, it is published only *once* at the next update call.
Constructor Summary | |
---|---|
MetricsLongValue(String nam)
Constructor - create a new metric |
Method Summary | |
---|---|
void |
dec()
Dec metrics by one |
void |
dec(long decr)
Inc metrics for incr vlaue |
long |
get()
Get value |
void |
inc()
Inc metrics by one |
void |
inc(long incr)
Inc metrics for incr vlaue |
void |
pushMetric(MetricsRecord mr)
Push the metric to the mr. |
void |
set(long newValue)
Set the value |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MetricsLongValue(String nam)
nam
- the name of the metrics to be used to publish the metricMethod Detail |
---|
public void set(long newValue)
newValue
- public long get()
public void inc(long incr)
incr
- - value to be addedpublic void inc()
public void dec(long decr)
decr
- - value to subtractpublic void dec()
public void pushMetric(MetricsRecord mr)
get()
mr
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |