Class VmInfo

java.lang.Object
org.eclipse.mat.snapshot.acquire.VmInfo
Direct Known Subclasses:
IBMVmInfo, JmapVmInfo

public class VmInfo extends Object
Instances of this class are descriptors of locally running Java processes. Arguments can be injected into the query using public fields marked with the Argument annotation. Typical arguments to be supplied by the user of the heap dump provider include The implementation can be tagged with the following annotations to control the description and help text.
Since:
1.0
  • Constructor Details

    • VmInfo

      public VmInfo()
      An empty constructor
    • VmInfo

      public VmInfo(int pid, String description, boolean heapDumpEnabled, String proposedFileName, IHeapDumpProvider heapDumpProvider)
      Constructor with parameters
      Parameters:
      pid - the process ID of the process
      description - a free text description of the process, usually the process name
      heapDumpEnabled - a boolean value indicating if a heap dump from the process can be acquired
      proposedFileName - a proposal for the file name, under which the heap dump can be saved. %pid% can be used as a placeholder for the PID. Example: java_pid%pid%.hprof
      heapDumpProvider - the IHeapDumpProvider which can use this VmInfo
  • Method Details

    • getPid

      public int getPid()
      Get the PID of the process
      Returns:
      the process ID
    • setPid

      public void setPid(int pid)
      Set the PID for the process descriptor
      Parameters:
      pid - process identifier
    • getDescription

      public String getDescription()
      Get the description of the Java process
      Returns:
      the description
    • setDescription

      public void setDescription(String description)
      Set the description of the Java process
      Parameters:
      description - description of the Java process
    • isHeapDumpEnabled

      public boolean isHeapDumpEnabled()
      Indicate if a heap dump can be acquired from the described process
      Returns:
      true if the heap dump can be triggered
    • setHeapDumpEnabled

      public void setHeapDumpEnabled(boolean heapDumpEnabled)
      Set the flag if heap dumps can be acquired from the described process
      Parameters:
      heapDumpEnabled - true if a heap dump is possible on this process
    • getHeapDumpProvider

      public IHeapDumpProvider getHeapDumpProvider()
      Get the heap dump provider which returned this VmInfo
      Returns:
      the heap dump provider
    • setHeapDumpProvider

      public void setHeapDumpProvider(IHeapDumpProvider heapDumpProvider)
      Set the heap dump provider of this VmInfo
      Parameters:
      heapDumpProvider -
    • getProposedFileName

      public String getProposedFileName()
      Returns a proposed file name under which the heap dump should be saved, e.g. java_pid%pid%.hprof for HPROF files or a file name template subject to substitution using MessageUtil.format(java.lang.String, java.lang.Object...) with three parameters, Date date, int pid, int index For example: mydumpname.{0,date,yyyyMMdd.HHmmss}.{1,number,0}.{2,number,0000}.dmp
      Returns:
      a suggested file name template
    • setProposedFileName

      public void setProposedFileName(String proposedFileName)
      Set the proposed file name for this process
      Parameters:
      proposedFileName -
    • toString

      public String toString()
      Overrides:
      toString in class Object