- 
- All Superinterfaces:
- PlatformManagedObject
 
 public interface HotSpotDiagnosticMXBean extends PlatformManagedObject Diagnostic management interface for the HotSpot Virtual Machine.The diagnostic MBean is registered to the platform MBeanServer as are other platform MBeans. The ObjectNamefor uniquely identifying the diagnostic MXBean within an MBeanServer is:
 .* It can be obtained by calling thecom.sun.management:type=HotSpotDiagnosticPlatformManagedObject.getObjectName()method. All methods throw aNullPointerExceptionif any input argument isnullunless it's stated otherwise.
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voiddumpHeap(String outputFile, boolean live)Dumps the heap to theoutputFilefile in the same format as the hprof heap dump.List<VMOption>getDiagnosticOptions()Returns a list ofVMOptionobjects for all diagnostic options.VMOptiongetVMOption(String name)Returns aVMOptionobject for a VM option of the given name.voidsetVMOption(String name, String value)Sets a VM option of the given name to the specified value.- 
Methods declared in interface java.lang.management.PlatformManagedObjectgetObjectName
 
- 
 
- 
- 
- 
Method Detail- 
dumpHeapvoid dumpHeap(String outputFile, boolean live) throws IOException Dumps the heap to theoutputFilefile in the same format as the hprof heap dump.If this method is called remotely from another process, the heap dump output is written to a file named outputFileon the machine where the target VM is running. If outputFile is a relative path, it is relative to the working directory where the target VM was started.- Parameters:
- outputFile- the system-dependent filename
- live- if- truedump only live objects i.e. objects that are reachable from others
- Throws:
- IOException- if the- outputFilealready exists, cannot be created, opened, or written to.
- UnsupportedOperationException- if this operation is not supported.
- IllegalArgumentException- if- outputFiledoes not end with ".hprof" suffix.
- NullPointerException- if- outputFileis- null.
- SecurityException- If a security manager exists and its- SecurityManager.checkWrite(java.lang.String)method denies write access to the named file or the caller does not have ManagmentPermission("control").
 
 - 
getDiagnosticOptionsList<VMOption> getDiagnosticOptions() Returns a list ofVMOptionobjects for all diagnostic options. A diagnostic option is awriteableVM option that can be set dynamically mainly for troubleshooting and diagnosis.- Returns:
- a list of VMOptionobjects for all diagnostic options.
 
 - 
getVMOptionVMOption getVMOption(String name) Returns aVMOptionobject for a VM option of the given name.- Returns:
- a VMOptionobject for a VM option of the given name.
- Throws:
- NullPointerException- if name is- null.
- IllegalArgumentException- if a VM option of the given name does not exist.
 
 - 
setVMOptionvoid setVMOption(String name, String value) Sets a VM option of the given name to the specified value. The new value will be reflected in a newVMOptionobject returned by thegetVMOption(java.lang.String)method or thegetDiagnosticOptions()method. This method does not change the value of thisVMOptionobject.- Parameters:
- name- Name of a VM option
- value- New value of the VM option to be set
- Throws:
- IllegalArgumentException- if the VM option of the given name does not exist.
- IllegalArgumentException- if the new value is invalid.
- IllegalArgumentException- if the VM option is not writable.
- NullPointerException- if name or value is- null.
- SecurityException- if a security manager exists and the caller does not have ManagementPermission("control").
 
 
- 
 
-