public class ResourceUsageMetrics extends Object implements Writable, DeepCompare
| 构造器和说明 |
|---|
ResourceUsageMetrics() |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
deepCompare(DeepCompare other,
TreePath loc) |
long |
getCumulativeCpuUsage()
Get the cumulative CPU usage.
|
long |
getHeapUsage()
Get the total heap usage.
|
long |
getPhysicalMemoryUsage()
Get the physical memory usage.
|
long |
getVirtualMemoryUsage()
Get the virtual memory usage.
|
void |
readFields(DataInput in)
Deserialize the fields of this object from
in. |
void |
setCumulativeCpuUsage(long usage)
Set the cumulative CPU usage.
|
void |
setHeapUsage(long usage)
Set the total heap usage.
|
void |
setPhysicalMemoryUsage(long usage)
Set the physical memory usage.
|
void |
setVirtualMemoryUsage(long usage)
Set the virtual memory usage.
|
int |
size()
Returns the size of the serialized data
|
void |
write(DataOutput out)
Serialize the fields of this object to
out. |
public long getCumulativeCpuUsage()
public void setCumulativeCpuUsage(long usage)
public long getVirtualMemoryUsage()
public void setVirtualMemoryUsage(long usage)
public long getPhysicalMemoryUsage()
public void setPhysicalMemoryUsage(long usage)
public long getHeapUsage()
public void setHeapUsage(long usage)
public int size()
public void readFields(DataInput in) throws IOException
Writablein.
For efficiency, implementations should attempt to re-use storage in the existing object where possible.
readFields 在接口中 Writablein - DataInput to deseriablize this object from.IOExceptionpublic void write(DataOutput out) throws IOException
Writableout.write 在接口中 Writableout - DataOuput to serialize this object into.IOExceptionpublic void deepCompare(DeepCompare other, TreePath loc) throws DeepInequalityException
deepCompare 在接口中 DeepCompareother - the other comparand that's being compared to meloc - the path that got to me. In the root, myLocation is null. To
process the scalar foo field of the root we will make a
recursive call with a TreePath whose fieldName is
"bar" and whose index is -1 and whose parent is null. To process the plural bar field
of the root we will make a recursive call with a TreePath
whose fieldName is "foo" and whose index is -1 and
whose parent is also null.DeepInequalityExceptionCopyright © 2009 The Apache Software Foundation