|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectariba.util.core.MemoryStats
public class MemoryStats
Simple class that captures the current memory situation.
Constructor Summary | |
---|---|
MemoryStats(long max,
long free,
long total)
|
Method Summary | |
---|---|
long |
available()
|
double |
availableInMB()
|
double |
availablePercentage()
|
static double |
convertToMB(long bytes)
Converts a long number of bytes to a double rounded to one decimal place. |
long |
free()
|
double |
freeInMB()
|
static double |
getAvailablePercentage()
|
static double |
getAvailablePercentage(long max,
long free,
long total)
Returns the free memory as a percentage of max memory in the system for the specified max and free memory. |
static MemoryStats |
getCurrentStats()
Returns the current memory stats. |
long |
max()
|
double |
maxInMB()
|
long |
total()
|
double |
totalInMB()
|
long |
used()
|
double |
usedInMB()
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MemoryStats(long max, long free, long total)
Method Detail |
---|
public static double convertToMB(long bytes)
public static MemoryStats getCurrentStats()
public static double getAvailablePercentage(long max, long free, long total)
max
and free
memory.
public static double getAvailablePercentage()
public long max()
public long free()
public long total()
public long used()
public long available()
public double maxInMB()
public double freeInMB()
public double usedInMB()
public double totalInMB()
public double availableInMB()
public double availablePercentage()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |