|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.hadoop.metrics2.Metric
public abstract class Metric
The immutable metric
| Field Summary | |
|---|---|
static String |
NO_DESCRIPTION
|
| Constructor Summary | |
|---|---|
Metric(String name)
Construct the metric with name only |
|
Metric(String name,
String desc)
Construct the metric with a name and a description |
|
| Method Summary | |
|---|---|
String |
description()
Get the description of the metric |
boolean |
equals(Object obj)
|
int |
hashCode()
|
String |
name()
Get the name of the metric |
String |
toString()
|
abstract Number |
value()
Get the value of the metric |
abstract void |
visit(MetricsVisitor visitor)
Accept a visitor interface |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String NO_DESCRIPTION
| Constructor Detail |
|---|
public Metric(String name)
name - of the metric
public Metric(String name,
String desc)
name - of the metricdesc - description of the metric| Method Detail |
|---|
public String name()
public String description()
public abstract Number value()
public abstract void visit(MetricsVisitor visitor)
visitor - of the metricpublic boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||