|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectp2pMapReduce.mapreduceModule.Counter
public class Counter
A named counter that tracks the progress of a map/reduce job.
Counters
represent global counters, defined either by the
Map-Reduce framework or applications. Each Counter
is named by
an Enum
and has a long for the value.
Counters
are bunched into Groups, each comprising of
counters from a particular Enum
class.
Constructor Summary | |
---|---|
protected |
Counter()
|
protected |
Counter(java.lang.String name,
java.lang.String displayName)
|
|
Counter(java.lang.String name,
java.lang.String displayName,
long value)
Create a counter. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object genericRight)
|
java.lang.String |
getDisplayName()
Get the name of the counter. |
java.lang.String |
getName()
|
long |
getValue()
What is the current value of this counter? |
int |
hashCode()
|
void |
increment(long incr)
Increment this counter by the given value |
protected void |
setDisplayName(java.lang.String displayName)
Deprecated. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
protected Counter()
protected Counter(java.lang.String name, java.lang.String displayName)
public Counter(java.lang.String name, java.lang.String displayName, long value)
name
- the name within the group's enum.displayName
- a name to be displayed.value
- the counter value.Method Detail |
---|
@Deprecated protected void setDisplayName(java.lang.String displayName)
public java.lang.String getName()
public java.lang.String getDisplayName()
public long getValue()
public void increment(long incr)
incr
- the value to increase this counter bypublic boolean equals(java.lang.Object genericRight)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |