C - the type of the Counter for the group@InterfaceAudience.Private public abstract class FileSystemCounterGroup<C extends Counter> extends java.lang.Object implements CounterGroupBase<C>
| Modifier and Type | Class and Description |
|---|---|
class |
FileSystemCounterGroup.FSCounter |
| Constructor and Description |
|---|
FileSystemCounterGroup() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCounter(C counter)
Add a counter to this group.
|
C |
addCounter(java.lang.String name,
java.lang.String displayName,
long value)
Add a counter to this group
|
boolean |
equals(java.lang.Object genericRight) |
C |
findCounter(java.lang.String counterName)
Find a counter in the group.
|
C |
findCounter(java.lang.String counterName,
boolean create)
Find a counter in the group
|
C |
findCounter(java.lang.String scheme,
FileSystemCounter key) |
C |
findCounter(java.lang.String counterName,
java.lang.String displayName)
Find a counter in the group.
|
java.lang.String |
getDisplayName()
Get the display name of the group.
|
java.lang.String |
getName()
Get the internal name of the group
|
int |
hashCode() |
void |
incrAllCounters(CounterGroupBase<C> other)
Increment all counters by a group of counters
|
java.util.Iterator<C> |
iterator() |
protected abstract C |
newCounter(java.lang.String scheme,
FileSystemCounter key)
Abstract factory method to create a file system counter
|
void |
readFields(java.io.DataInput in) |
void |
setDisplayName(java.lang.String displayName)
Set the display name of the group
|
int |
size() |
void |
write(java.io.DataOutput out)
FileSystemGroup ::= #scheme (scheme #counter (key value)*)*
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetUnderlyingGrouppublic java.lang.String getName()
CounterGroupBasegetName in interface CounterGroupBase<C extends Counter>public java.lang.String getDisplayName()
CounterGroupBasegetDisplayName in interface CounterGroupBase<C extends Counter>public void setDisplayName(java.lang.String displayName)
CounterGroupBasesetDisplayName in interface CounterGroupBase<C extends Counter>displayName - of the grouppublic void addCounter(C counter)
CounterGroupBaseaddCounter in interface CounterGroupBase<C extends Counter>counter - to addpublic C addCounter(java.lang.String name, java.lang.String displayName, long value)
CounterGroupBaseaddCounter in interface CounterGroupBase<C extends Counter>name - of the counterdisplayName - of the countervalue - of the counterpublic C findCounter(java.lang.String counterName, java.lang.String displayName)
CounterGroupBasefindCounter in interface CounterGroupBase<C extends Counter>counterName - the name of the counterdisplayName - the display name of the counterpublic C findCounter(java.lang.String counterName, boolean create)
CounterGroupBasefindCounter in interface CounterGroupBase<C extends Counter>counterName - the name of the countercreate - create the counter if not found if truepublic C findCounter(java.lang.String counterName)
CounterGroupBasefindCounter in interface CounterGroupBase<C extends Counter>counterName - the name of the counterpublic C findCounter(java.lang.String scheme, FileSystemCounter key)
protected abstract C newCounter(java.lang.String scheme, FileSystemCounter key)
scheme - of the file systemkey - the enum of the file system counterpublic int size()
size in interface CounterGroupBase<C extends Counter>public void incrAllCounters(CounterGroupBase<C> other)
CounterGroupBaseincrAllCounters in interface CounterGroupBase<C extends Counter>other - the group to be added to this grouppublic void write(java.io.DataOutput out)
throws java.io.IOException
write in interface org.apache.hadoop.io.Writablejava.io.IOExceptionpublic void readFields(java.io.DataInput in)
throws java.io.IOException
readFields in interface org.apache.hadoop.io.Writablejava.io.IOExceptionpublic java.util.Iterator<C> iterator()
public boolean equals(java.lang.Object genericRight)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.ObjectCopyright © 2009 The Apache Software Foundation