public final class VMMemoryPoolMXBeanImpl extends Object
Constructor and Description |
---|
VMMemoryPoolMXBeanImpl() |
Modifier and Type | Method and Description |
---|---|
(package private) static MemoryUsage |
getCollectionUsage(String name)
Collection usage refers to memory usage within the specified pool
after a garbage collection run.
|
(package private) static long |
getCollectionUsageThreshold(String name)
Returns the current threshold level for collection usage on the
specified pool.
|
(package private) static long |
getCollectionUsageThresholdCount(String name)
Returns the number of times the threshold level for collection usage
has been met or exceeded for the specified pool.
|
(package private) static String[] |
getMemoryManagerNames(String name)
Returns the name of the memory manager which manages
the specified pool.
|
(package private) static MemoryUsage |
getPeakUsage(String name)
Returns the peak usage of the specified pool.
|
static String[] |
getPoolNames()
Retrieves a list of names for all the pools.
|
(package private) static MemoryType |
getType(String name)
Returns the type of the specified pool, which can be
either "HEAP" or "NON_HEAP".
|
(package private) static MemoryUsage |
getUsage(String name)
Returns the memory usage of the specified pool.
|
(package private) static long |
getUsageThreshold(String name)
Returns the current threshold level for usage on the
specified pool.
|
(package private) static long |
getUsageThresholdCount(String name)
Returns the number of times the threshold level for usage has been
met or exceeded for the specified pool.
|
(package private) static boolean |
isValid(String name)
We simply assume a pool is valid if it is in the list of pool names
we maintain.
|
(package private) static void |
resetPeakUsage()
Resets the current peak usage value to the current usage.
|
(package private) static void |
setCollectionUsageThreshold(String name,
long threshold)
Sets the threshold level for collection usage.
|
(package private) static void |
setUsageThreshold(String name,
long threshold)
Sets the threshold level for memory usage.
|
public VMMemoryPoolMXBeanImpl()
public static String[] getPoolNames()
static MemoryUsage getCollectionUsage(String name)
null
.name
- the name of the pool whose usage should be returned.null
.static long getCollectionUsageThreshold(String name)
name
- the name of the pool whose usage threshold should be returned.static long getCollectionUsageThresholdCount(String name)
name
- the name of the pool whose usage threshold count should be returned.static String[] getMemoryManagerNames(String name)
name
- the name of the pool whose memory managers should
be returned.static MemoryUsage getPeakUsage(String name)
name
- the name of the pool whose peak usage should be returned.static MemoryType getType(String name)
name
- the name of the pool whose peak usage should be returned.static MemoryUsage getUsage(String name)
name
- the name of the pool whose usage should be returned.static long getUsageThreshold(String name)
name
- the name of the pool whose usage threshold should be returned.static long getUsageThresholdCount(String name)
name
- the name of the pool whose usage threshold count should be returned.static boolean isValid(String name)
name
- the pool whose validity should be checked.static void resetPeakUsage()
static void setCollectionUsageThreshold(String name, long threshold)
name
- the name of the pool whose threshold should be set.threshold
- the new threshold value.static void setUsageThreshold(String name, long threshold)
name
- the name of the pool whose threshold should be set.threshold
- the new threshold value.