Interface PhaseInfo

All Known Implementing Classes:
ConcurrentInfo, PauseInfo

public interface PhaseInfo
The PhaseInfo interface is the common interface of ConcurrentInfo and PauseInfo. Objects of these two classes describe the concurrent and stop-the-world phases of a garbage collection and are made available via a GcInfo object. PhaseInfo includes a type, an integer identifier whose value is the number of phases of that type done by the associated garbage collector, a timestamp specifying the time since the launch of the Java virtual machine at the start of the phase, and the wall clock duration of the phase. The type is a String string describing the phase type, is specific to the implementation of the Java virtual machine and unique across all phase types.
Since:
18
  • Method Summary

    Modifier and Type
    Method
    Description
    default long
    The approximate elapsed time in nanoseconds (wall clock time) between the start and end of this phase.
    long
    The approximate end time of this phase in nanoseconds since Java virtual machine launch.
    long
    Returns the identifier of this phase, which is the number of phases of this type done by this collector.
    The reason that for this phase.
    long
    The number of garbage collection threads used during this phase from the pool of garbage collection threads of the associated collector.
    The type of this phase.
    long
    The approximate start time of this phase in nanoseconds since the Java virtual machine was started.
  • Method Details

    • getId

      long getId()
      Returns the identifier of this phase, which is the number of phases of this type done by this collector.
      Returns:
      the identifier of this phase, which is the number of phases of this type done by this collector
    • getPhaseType

      String getPhaseType()
      The type of this phase. Types are unique across the Java virtual machine.
      Returns:
      a String representing the type of this pause.
    • getStartTimeNanos

      long getStartTimeNanos()
      The approximate start time of this phase in nanoseconds since the Java virtual machine was started.
      Returns:
      the start time of this phase.
    • getPhaseCause

      String getPhaseCause()
      The reason that for this phase. Reasons are unique across the Java virtual machine.
      Returns:
      a String representing the reason for this phase.
    • getEndTimeNanos

      long getEndTimeNanos()
      The approximate end time of this phase in nanoseconds since Java virtual machine launch.
      Returns:
      the end time of this phase.
    • getDurationNanos

      default long getDurationNanos()
      The approximate elapsed time in nanoseconds (wall clock time) between the start and end of this phase.
      Returns:
      the elapsed time of this phase.
    • getPhaseGarbageCollectorThreadCount

      long getPhaseGarbageCollectorThreadCount()
      The number of garbage collection threads used during this phase from the pool of garbage collection threads of the associated collector.
      Returns:
      the number of garbage collection threads used during this phase.