public interface MemoryMXBean
extends java.lang.management.MemoryMXBean
Modifier and Type | Method and Description |
---|---|
int |
getCurrentGCThreads()
Returns the number of GC worker threads that participated in the most recent collection.
|
long |
getGCMasterThreadCpuUsed()
Returns the amount of CPU time spent in the GC by the master thread, in milliseconds.
|
java.lang.String |
getGCMode()
Returns the current GC mode as a human-readable string.
|
long |
getGCSlaveThreadsCpuUsed()
Returns the total amount of CPU time spent in the GC by all slave threads, in milliseconds.
|
long |
getMaxHeapSize()
Get the current maximum heap size in bytes.
|
long |
getMaxHeapSizeLimit()
Get the maximum size in bytes to which the max heap size could be
increased in the currently running VM.
|
int |
getMaximumGCThreads()
Returns the maximum number of GC worker threads.
|
long |
getMinHeapSize()
Get the minimum heap size in bytes.
|
long |
getSharedClassCacheFreeSpace()
Returns the free space in bytes of the cache that the JVM is
currently connected to.
|
long |
getSharedClassCacheSize()
Returns the total size in bytes of the cache that the JVM is currently
connected to.
|
boolean |
isSetMaxHeapSizeSupported()
Query whether the VM supports runtime reconfiguration of the
maximum heap size through the setMaxHeapSize() call.
|
void |
setMaxHeapSize(long size)
Set the current maximum heap size to
size . |
long getMaxHeapSizeLimit()
long getMaxHeapSize()
long getMinHeapSize()
void setMaxHeapSize(long size)
size
.
The parameter specifies the max heap size in bytes and must be
between getMinHeapSize() and getMaxHeapSizeLimit().
If this operation is not supported, this method will throw
UnsupportedOperationException.size
- new -Xsoftmx value in bytesboolean isSetMaxHeapSizeSupported()
long getSharedClassCacheSize()
long getSharedClassCacheFreeSpace()
java.lang.String getGCMode()
long getGCMasterThreadCpuUsed()
long getGCSlaveThreadsCpuUsed()
int getMaximumGCThreads()
int getCurrentGCThreads()