|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectsk.baka.webvm.misc.MgmtUtils
public final class MgmtUtils
Provides utilities for the java.util.management package.
| Method Summary | |
|---|---|
static MemoryUsage |
add(MemoryUsage u1,
MemoryUsage u2)
Sums two memory usages together. |
static String |
getFreePerc(MemoryUsage mu)
Returns amount of free memory in the following format: xx% |
static MemoryUsage |
getHeapFromRuntime()
Computes and returns the memory usage object, using information only from Runtime. |
static MemoryUsage |
getInMB(MemoryUsage mu)
Returns a new object with all values divided by 1024*1024 (converted from bytes to mebibytes). |
static SortedMap<String,MemoryPoolMXBean> |
getMemoryPools()
Returns all known memory pools which are garbage-collectable and provide meaningful usage information. |
static MemoryUsage |
getNonHeapSummary()
Sums up all non-heap pools and return their memory usage. |
static String |
getUsagePerc(MemoryUsage mu)
Returns memory usage in the following format: xx% |
static boolean |
isNonHeapPool()
Checks if there is a non-heap pool in the memory pool list. |
static String |
toString(MemoryUsage mu,
boolean inMegs)
Formats a memory usage instance to a compact string. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static MemoryUsage getNonHeapSummary()
public static boolean isNonHeapPool()
public static MemoryUsage getHeapFromRuntime()
Runtime.
public static MemoryUsage add(MemoryUsage u1,
MemoryUsage u2)
u1 - first usage, must not be nullu2 - second usage, must not be null
public static MemoryUsage getInMB(MemoryUsage mu)
mu - the memory usage to convert
public static String toString(MemoryUsage mu,
boolean inMegs)
mu - the memory usage object.inMegs - if true then given memory usage values are already megabytes. If false then the values are in bytes.
public static String getUsagePerc(MemoryUsage mu)
mu - the memory usage object, may be null
public static String getFreePerc(MemoryUsage mu)
mu - the memory usage object, may be null
public static SortedMap<String,MemoryPoolMXBean> getMemoryPools()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||