All Implemented Interfaces:
CpuData, HealthCenterData, NotificationBroadcaster, NotificationEmitter

public class CpuDataImpl extends HealthCenterDataImpl implements CpuData
  • Constructor Details

    • CpuDataImpl

      public CpuDataImpl(com.ibm.java.diagnostics.common.datamodel.data.Data data)
  • Method Details

    • getRecommendationLabel

      protected String getRecommendationLabel()
      Specified by:
      getRecommendationLabel in class HealthCenterDataImpl
    • getSubsystemLabel

      protected String getSubsystemLabel()
      Specified by:
      getSubsystemLabel in class HealthCenterDataImpl
    • getProcessUse

      public CpuInfo[] getProcessUse()
      Description copied from interface: CpuData
      Gets the data associated with the process CPU use. NOTE If running in "event only" mode, this data will always return an empty array. This is because "event only" does not store any data to inquire on. Instead, you need to use the api calls to register listeners and get notification of when events occur
      Specified by:
      getProcessUse in interface CpuData
      Returns:
      an array of CpuInfo objects.
    • getSystemUse

      public CpuInfo[] getSystemUse()
      Description copied from interface: CpuData
      Gets the data associated with the system CPU use. NOTE If running in "event only" mode, this data will always return an empty array. This is because "event only" does not store any data to inquire on. Instead, you need to use the api calls to register listeners and get notification of when events occur
      Specified by:
      getSystemUse in interface CpuData
      Returns:
      an array of CpuInfo objects.
    • startNotifying

      public void startNotifying()
      Description copied from interface: HealthCenterData
      Starts a thread which checks for changes in the data every 2000 milliseconds and sends notifications if an update has occurred. To handle these notifications, a NotificationListener needs to be added to the object the thread is being started from.
      Specified by:
      startNotifying in interface HealthCenterData
    • startNotifying

      public void startNotifying(long delay)
      Description copied from interface: HealthCenterData
      Starts a thread which checks for changes in the data and sends notifications if an update has occurred. To handle these notifications, a NotificationListener needs to be added to the object the thread is being started from.
      Specified by:
      startNotifying in interface HealthCenterData
      Parameters:
      delay - The number of milliseconds between each update. The default is 2000 milliseconds and anything below this will not be accepted.
    • getMaxSystemUse

      public double getMaxSystemUse()
      Description copied from interface: CpuData
      Gets the maximum percentage value for system CPU use.
      Specified by:
      getMaxSystemUse in interface CpuData
      Returns:
      maximum percentage as a double
    • getMeanSystemUse

      public double getMeanSystemUse()
      Description copied from interface: CpuData
      Gets the mean percentage value for system CPU use.
      Specified by:
      getMeanSystemUse in interface CpuData
      Returns:
      mean percentage as a double
    • getMinSystemUse

      public double getMinSystemUse()
      Description copied from interface: CpuData
      Gets the minimum percentage value for system CPU use.
      Specified by:
      getMinSystemUse in interface CpuData
      Returns:
      minimum percentage as a double
    • getMaxProcessUse

      public double getMaxProcessUse()
      Description copied from interface: CpuData
      Gets the maximum percentage value for process CPU use.
      Specified by:
      getMaxProcessUse in interface CpuData
      Returns:
      maximum percentage as a double
    • getMeanProcessUse

      public double getMeanProcessUse()
      Description copied from interface: CpuData
      Gets the mean percentage value for process CPU use.
      Specified by:
      getMeanProcessUse in interface CpuData
      Returns:
      mean percentage as a double
    • getMinProcessUse

      public double getMinProcessUse()
      Description copied from interface: CpuData
      Gets the minimum percentage value for process CPU use.
      Specified by:
      getMinProcessUse in interface CpuData
      Returns:
      minimum percentage as a double
    • addCpuListener

      public void addCpuListener(CpuEventListener listener)
      Description copied from interface: CpuData
      Add a listener for notification of when CPU events occur
      Specified by:
      addCpuListener in interface CpuData