java.lang.Object
com.ibm.java.diagnostics.healthcenter.api.vmcontrol.impl.VMControlImpl
All Implemented Interfaces:
com.ibm.java.diagnostics.common.datamodel.data.DataListener, VMControl

public class VMControlImpl extends Object implements VMControl, com.ibm.java.diagnostics.common.datamodel.data.DataListener
  • Constructor Details

    • VMControlImpl

      public VMControlImpl(com.ibm.java.diagnostics.healthcenter.impl.marshalling.MarshallerImpl marshallerInstance)
  • Method Details

    • dataChanged

      public void dataChanged(com.ibm.java.diagnostics.common.datamodel.data.DataChangedEvent event)
      Specified by:
      dataChanged in interface com.ibm.java.diagnostics.common.datamodel.data.DataListener
    • setObjectAllocationsEnabled

      public void setObjectAllocationsEnabled(long lowThreshold, long highThreshold)
      Description copied from interface: VMControl
      Enables the collection of object allocation data for objects within a specified size range.
      Specified by:
      setObjectAllocationsEnabled in interface VMControl
      Parameters:
      lowThreshold - the minimum size (in bytes) of the objects to collect data on.
      highThreshold - the maximum size (in bytes) of the objects to collect data on.
    • setObjectAllocationsEnabled

      public void setObjectAllocationsEnabled(long lowValue)
      Description copied from interface: VMControl
      Enables the collection of object allocation data for objects above a specified size.
      Specified by:
      setObjectAllocationsEnabled in interface VMControl
      Parameters:
      lowValue - the minimum size (in bytes) of the objects to collect data on.
    • setVerboseGCCollectionEnabled

      public void setVerboseGCCollectionEnabled(boolean value)
      Description copied from interface: VMControl
      Turns the writing of verbose garbage collection data to a file on or off. The name of the file that is created is verbosegc_process_id_n.log, where process_id is the process ID of the monitored JVM, and n is a sequence number. The file is saved in a directory that is local to the monitored JVM specified by the com.ibm.java.diagnostics.healthcenter.output.folder property. If this property is not set, the file is saved in the directory that is specified by the user.dir system property.
      Specified by:
      setVerboseGCCollectionEnabled in interface VMControl
      Parameters:
      value - whether collection is on or off. *
    • triggerHeapDump

      public boolean triggerHeapDump()
      Description copied from interface: VMControl
      Triggers a heap dump in the running virtual machine. A heap dump provides a view of memory objects on the Java heap, and is used for memory analysis.
      Specified by:
      triggerHeapDump in interface VMControl
      Returns:
      true if the trigger command was successfully sent to the virtual machine, false if the command failed.
    • triggerJavaDump

      public boolean triggerJavaDump()
      Description copied from interface: VMControl
      Triggers a Java dump in the running virtual machine. A Java dump is also known as a thread dump of the Java core. The Java dump is used for viewing the thread activity inside the JVM at a given time.
      Specified by:
      triggerJavaDump in interface VMControl
      Returns:
      true if the trigger command was successfully sent to the virtual machine, false if the command failed.
    • triggerSystemDump

      public boolean triggerSystemDump()
      Description copied from interface: VMControl
      Triggers a system dump in the running virtual machine. A system dump is also known as a core dump. System dump creation involves dumping the entire address space, and can therefore produce very large dumps, and take some time to complete.
      Specified by:
      triggerSystemDump in interface VMControl
      Returns:
      true if the trigger command was successfully sent to the virtual machine, false if the command failed.
    • setGCDataCollectionEnabled

      public void setGCDataCollectionEnabled(boolean value)
      Description copied from interface: VMControl
      Turns GC data collection on or off. By default, GC data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.
      Specified by:
      setGCDataCollectionEnabled in interface VMControl
      Parameters:
      value - whether the collection is on or off.
    • setClassesDataCollectionEnabled

      public void setClassesDataCollectionEnabled(boolean value)
      Description copied from interface: VMControl
      Turns classes data collection on or off. By default, classes data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.
      Specified by:
      setClassesDataCollectionEnabled in interface VMControl
      Parameters:
      value - whether the collection is on or off.
    • setIODataCollectionEnabled

      public void setIODataCollectionEnabled(boolean value)
      Description copied from interface: VMControl
      Turns IO data collection on or off. By default, IO data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.
      Specified by:
      setIODataCollectionEnabled in interface VMControl
      Parameters:
      value - whether the collection is on or off.
    • setLockingDataCollectionEnabled

      public void setLockingDataCollectionEnabled(boolean value)
      Description copied from interface: VMControl
      Turns locking data collection on or off. By default, locking data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.
      Specified by:
      setLockingDataCollectionEnabled in interface VMControl
      Parameters:
      value - whether the collection is on or off.
    • setNativeMemoryDataCollectionEnabled

      public void setNativeMemoryDataCollectionEnabled(boolean value)
      Description copied from interface: VMControl
      Turns native memory data collection on or off. By default, native memory data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.
      Specified by:
      setNativeMemoryDataCollectionEnabled in interface VMControl
      Parameters:
      value - whether the collection is on or off.
    • setProfilingDataCollectionEnabled

      public void setProfilingDataCollectionEnabled(boolean value)
      Description copied from interface: VMControl
      Turns profiling data collection on or off. By default, profiling data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.
      Specified by:
      setProfilingDataCollectionEnabled in interface VMControl
      Parameters:
      value - whether the collection is on or off.
    • setThreadDataCollectionEnabled

      public void setThreadDataCollectionEnabled(boolean value)
      Description copied from interface: VMControl
      Turns thread data collection on or off. By default, thread data collection is on. Turning this data off can reduce the amount of data generated by the virtual machine that is running the monitored application, and as a result, can reduce the overhead of monitoring an application with the Health Center.
      Specified by:
      setThreadDataCollectionEnabled in interface VMControl
      Parameters:
      value - whether the collection is on or off.
    • setTracePointEnabled

      public void setTracePointEnabled(String tracePointID, boolean value) throws HealthCenterException
      Description copied from interface: VMControl
      Turns individual trace points on or off.
      Specified by:
      setTracePointEnabled in interface VMControl
      Parameters:
      tracePointID - the ID of the trace point to enable or disable.
      value - whether the trace point is on or off.
      Throws:
      HealthCenterException - if the call is unsuccessful.
    • setCallStackCollectionEnabled

      public void setCallStackCollectionEnabled(boolean value)
      Description copied from interface: VMControl
      Enables the collection of call stacks for sampled object allocation events.
      Specified by:
      setCallStackCollectionEnabled in interface VMControl
      Parameters:
      value - whether the collection is on or off.
    • setMaxStackDepth

      public void setMaxStackDepth(int depth)
      Description copied from interface: VMControl
      Sets the maximum number of stack entries to collect for each event.
      Specified by:
      setMaxStackDepth in interface VMControl
      Parameters:
      depth - the maximum number of stack entries.
    • isGCDataCollectionEnabled

      public boolean isGCDataCollectionEnabled()
      Description copied from interface: VMControl
      Returns whether GC data collection is enabled.
      Specified by:
      isGCDataCollectionEnabled in interface VMControl
      Returns:
      boolean.
    • isIODataCollectionEnabled

      public boolean isIODataCollectionEnabled()
      Description copied from interface: VMControl
      Returns whether IO data collection is enabled.
      Specified by:
      isIODataCollectionEnabled in interface VMControl
      Returns:
      boolean.
    • isClassesDataCollectionEnabled

      public boolean isClassesDataCollectionEnabled()
      Description copied from interface: VMControl
      Returns whether classes data collection is enabled.
      Specified by:
      isClassesDataCollectionEnabled in interface VMControl
      Returns:
      boolean.
    • isLockingDataCollectionEnabled

      public boolean isLockingDataCollectionEnabled()
      Description copied from interface: VMControl
      Returns whether locking data collection is enabled.
      Specified by:
      isLockingDataCollectionEnabled in interface VMControl
      Returns:
      boolean.
    • isNativeMemoryDataCollectionEnabled

      public boolean isNativeMemoryDataCollectionEnabled()
      Description copied from interface: VMControl
      Returns whether native memory data collection is enabled.
      Specified by:
      isNativeMemoryDataCollectionEnabled in interface VMControl
      Returns:
      boolean.
    • isProfilingDataCollectionEnabled

      public boolean isProfilingDataCollectionEnabled()
      Description copied from interface: VMControl
      Returns whether profiling data collection is enabled.
      Specified by:
      isProfilingDataCollectionEnabled in interface VMControl
      Returns:
      boolean.
    • isThreadsDataCollectionEnabled

      public boolean isThreadsDataCollectionEnabled()
      Description copied from interface: VMControl
      Returns whether threads data collection is enabled.
      Specified by:
      isThreadsDataCollectionEnabled in interface VMControl
      Returns:
      boolean.
    • collectClassHistogramData

      public void collectClassHistogramData() throws HealthCenterNotSupportedException
      Description copied from interface: VMControl
      Triggers the collection of the class histogram data. For every class loaded, this process collects the number of instances of that class, and the total amount of memory that is used by those instances.
      Specified by:
      collectClassHistogramData in interface VMControl
      Throws:
      HealthCenterNotSupportedException
    • setThreadStackDepth

      public void setThreadStackDepth(int depth)
      Description copied from interface: VMControl
      Sets the maximum number of stack entries to collect for each thread. Setting this to zero will turn off thread stack collection.
      Specified by:
      setThreadStackDepth in interface VMControl
      Parameters:
      depth - the maximum number of stack entries required.