public class MemoryUsage extends Object
Constructor and Description |
---|
MemoryUsage()
Creates a new
MemoryUsage instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Compares the argument to the receiver, and answers true
if they represent the same object using a class
specific comparison.
|
static MemoryUsage |
from(CompositeData cd)
Receives a
CompositeData representing a MemoryUsage |
long |
getBuffered()
The amount of buffered memory in bytes.
|
long |
getCached()
The amount of cached memory in bytes.
|
long |
getFree()
The total amount of free physical memory in bytes.
|
long |
getSwapFree()
The amount of free swap space in bytes.
|
long |
getSwapTotal()
The amount of total swap space in bytes.
|
long |
getTimestamp()
The timestamp when the usage statistics were last sampled in microseconds.
|
long |
getTotal()
The total amount of usable physical memory in bytes.
|
int |
hashCode()
Answers an integer hash code for the receiver.
|
String |
toString()
Text description of this
MemoryUsage object. |
public MemoryUsage()
MemoryUsage
instance.public long getTotal()
public long getFree()
public long getSwapTotal()
public long getSwapFree()
public long getCached()
public long getBuffered()
public long getTimestamp()
public static MemoryUsage from(CompositeData cd)
CompositeData
representing a MemoryUsage
cd
- A CompositeData
that represents a MemoryUsage
cd
is non- null
, returns a new instance of
MemoryUsage
, If cd
is null
,
returns null
.IllegalArgumentException
- if argument cd
does not correspond
to a MemoryUsage
with the following attributes:
total
(java.lang.Long
)free
(java.lang.Long
)swapTotal
(java.lang.Long
)swapFree
(java.lang.Long
)cached
(java.lang.Long
)buffered
(java.lang.Long
)timestamp
(java.lang.Long
)public String toString()
MemoryUsage
object.toString
in class Object
MemoryUsage
object.public boolean equals(Object obj)
equals
in class Object
obj
- Object
the object to compare with this object.true
if the object is the same as this object
false
if it is different from this object.Object.hashCode()
public int hashCode()
true
when passed to
.equals
must answer the same value for this
method.hashCode
in class Object
Object.equals(java.lang.Object)
Eclipse OpenJ9 website.
To raise a bug report or suggest an improvement create an Eclipse OpenJ9 issue.
Copyright © 2001, 2024 IBM Corp. and others.