@InterfaceAudience.Private public class GenericCounter extends AbstractCounter
| Constructor and Description |
|---|
GenericCounter() |
GenericCounter(java.lang.String name,
java.lang.String displayName) |
GenericCounter(java.lang.String name,
java.lang.String displayName,
long value) |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getDisplayName()
Get the display name of the counter.
|
java.lang.String |
getName() |
Counter |
getUnderlyingCounter()
Return the underlying object if this is a facade.
|
long |
getValue()
What is the current value of this counter?
|
void |
increment(long incr)
Increment this counter by the given value
|
void |
readFields(java.io.DataInput in) |
void |
setDisplayName(java.lang.String displayName)
Deprecated.
|
void |
setValue(long value)
Set this counter by the given value
|
void |
write(java.io.DataOutput out)
GenericCounter ::= keyName isDistinctDisplayName [displayName] value
|
equals, hashCodepublic GenericCounter()
public GenericCounter(java.lang.String name,
java.lang.String displayName)
public GenericCounter(java.lang.String name,
java.lang.String displayName,
long value)
@Deprecated public void setDisplayName(java.lang.String displayName)
CountersetDisplayName in interface CountersetDisplayName in class AbstractCounterdisplayName - of the counterpublic void readFields(java.io.DataInput in)
throws java.io.IOException
java.io.IOExceptionpublic void write(java.io.DataOutput out)
throws java.io.IOException
java.io.IOExceptionpublic java.lang.String getName()
public java.lang.String getDisplayName()
Counterpublic long getValue()
Counterpublic void setValue(long value)
Countervalue - the value to setpublic void increment(long incr)
Counterincr - the value to increase this counter byCopyright © 2009 The Apache Software Foundation