Class PauseInfo

java.lang.Object
com.sun.management.PauseInfo
All Implemented Interfaces:
PhaseInfo, CompositeDataView

public class PauseInfo extends Object implements PhaseInfo, CompositeDataView
A PauseInfo object represents a pause event impacting all threads in a running Java virtual machine. It includes a String cause describing the reason for the pause which is specific to the implementation of the Java virtual machine, and unique across all pause reasons.

PauseInfo also has additional, optional, details of the time required for individual steps executed during the pause. The times for the individual steps make it easy to identify potential areas for reducing the total pause duration. Generally, the sum of the additional detailed timing information's times should add up to the total pause duration.

Since:
18
  • Constructor Details

    • PauseInfo

      public PauseInfo(long index, long startTime, long endTime, String pauseCause, long operationStartTime, long operationEndTime, long threadCount)
  • Method Details

    • getPhaseType

      public String getPhaseType()
      Description copied from interface: PhaseInfo
      The type of this phase. Types are unique across the Java virtual machine.
      Specified by:
      getPhaseType in interface PhaseInfo
      Returns:
      a String representing the type of this pause.
    • getId

      public long getId()
      Description copied from interface: PhaseInfo
      Returns the identifier of this phase, which is the number of phases of this type done by this collector.
      Specified by:
      getId in interface PhaseInfo
      Returns:
      the identifier of this phase, which is the number of phases of this type done by this collector
    • getStartTimeNanos

      public long getStartTimeNanos()
      Description copied from interface: PhaseInfo
      The approximate start time of this phase in nanoseconds since the Java virtual machine was started.
      Specified by:
      getStartTimeNanos in interface PhaseInfo
      Returns:
      the start time of this phase.
    • getEndTimeNanos

      public long getEndTimeNanos()
      Description copied from interface: PhaseInfo
      The approximate end time of this phase in nanoseconds since Java virtual machine launch.
      Specified by:
      getEndTimeNanos in interface PhaseInfo
      Returns:
      the end time of this phase.
    • getPhaseGarbageCollectorThreadCount

      public long getPhaseGarbageCollectorThreadCount()
      Description copied from interface: PhaseInfo
      The number of garbage collection threads used during this phase from the pool of garbage collection threads of the associated collector.
      Specified by:
      getPhaseGarbageCollectorThreadCount in interface PhaseInfo
      Returns:
      the number of garbage collection threads used during this phase.
    • getPhaseCause

      public String getPhaseCause()
      Description copied from interface: PhaseInfo
      The reason that for this phase. Reasons are unique across the Java virtual machine.
      Specified by:
      getPhaseCause in interface PhaseInfo
      Returns:
      a String representing the reason for this phase.
    • getThreadsSuspensionTimeNanos

      public long getThreadsSuspensionTimeNanos()
      Approximate time in nanoseconds spent waiting for all threads to suspend. The time returned from this method is commonly known as Time To Safepoint.
      Returns:
      the time spent waiting for all threads to suspend
    • getOperationTimeNanos

      public long getOperationTimeNanos()
      Approximate time in nanoseconds required to perform the operation for which suspension of all threads is required. The interval begins when all threads have been suspended and ends when the operation has been completed.
      Returns:
      the time spent on the operation associated with the pause.
    • getPostOperationCleanupTimeNanos

      public long getPostOperationCleanupTimeNanos()
      Approximate time in nanoseconds required for cleanup activities just prior to resumption of application thread execution.
      Returns:
      the time required for cleanup activities.
    • toCompositeData

      public CompositeData toCompositeData(CompositeType ct)
      Return the CompositeData representation of this PauseInfo, including any pause-specific attributes. The returned value will have at least all the attributes described in the from method.
      Specified by:
      toCompositeData in interface CompositeDataView
      Parameters:
      ct - the CompositeType that the caller expects. This parameter is ignored and can be null.
      Returns:
      the CompositeData representation.
    • from

      public static PauseInfo from(CompositeData cd)