public class MetricsLongValue extends MetricsBase
NO_DESCRIPTION
Constructor and Description |
---|
MetricsLongValue(String nam,
MetricsRegistry registry)
Constructor - create a new metric
|
MetricsLongValue(String nam,
MetricsRegistry registry,
String description)
Constructor - create a new metric
|
Modifier and Type | Method and Description |
---|---|
long |
get()
Get value
|
void |
pushMetric(MetricsRecord mr)
Push the metric to the mr.
|
void |
set(long newValue)
Set the value
|
getDescription, getName
public MetricsLongValue(String nam, MetricsRegistry registry, String description)
nam
- the name of the metrics to be used to publish the metricregistry
- - where the metrics object will be registeredpublic MetricsLongValue(String nam, MetricsRegistry registry)
nam
- the name of the metrics to be used to publish the metricregistry
- - where the metrics object will be registered
A description of MetricsBase.NO_DESCRIPTION
is usedpublic void set(long newValue)
newValue
- public long get()
public void pushMetric(MetricsRecord mr)
get()
pushMetric
in class MetricsBase
mr
- Copyright © 2010 The Apache Software Foundation