All Implemented Interfaces:
HealthCenterData, NativeMemoryData, NotificationBroadcaster, NotificationEmitter

public class NativeMemoryDataImpl extends HealthCenterDataImpl implements NativeMemoryData
  • Constructor Details

    • NativeMemoryDataImpl

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

    • getProcessPhysical

      public MemoryData[] getProcessPhysical()
      Description copied from interface: NativeMemoryData
      Gets the amount of physical memory (RAM) that is currently in use by the monitored process. On some platforms, this memory is called "resident storage" or the "working set". 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:
      getProcessPhysical in interface NativeMemoryData
      Returns:
      an array of MemoryData of the process physical memory. This is all the data available over time and not just the most recent.
    • getFreePhysicalMemory

      public MemoryData[] getFreePhysicalMemory()
      Description copied from interface: NativeMemoryData
      Gets the amount of physical memory (RAM) that is free on the monitored system. 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:
      getFreePhysicalMemory in interface NativeMemoryData
      Returns:
      an array of MemoryData of how much free memory there is. This is all the data available over time and not just the most recent.
    • getProcessPrivate

      public MemoryData[] getProcessPrivate()
      Description copied from interface: NativeMemoryData
      Gets the amount of memory that is used exclusively by the monitored process. This memory is not shared with other processes on the system. 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:
      getProcessPrivate in interface NativeMemoryData
      Returns:
      an array of MemoryData of the process private memory in use. This is all the data available over time and not just the most recent.
    • getTotalPhysicalMemory

      public MemoryData[] getTotalPhysicalMemory()
      Description copied from interface: NativeMemoryData
      Gets the total amount of installed physical memory. 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:
      getTotalPhysicalMemory in interface NativeMemoryData
      Returns:
      an array of MemoryData of the amount of installed memory. This is all the data available over time and not just the most recent.
    • getProcessVirtual

      public MemoryData[] getProcessVirtual()
      Description copied from interface: NativeMemoryData
      Gets the total process address space in 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:
      getProcessVirtual in interface NativeMemoryData
      Returns:
      an array of MemoryData of the process virtual memory. This is all the data available over time and not just the most recent.
    • getNativeMemoryRoot

      public NativeMemoryCategory getNativeMemoryRoot()
      Description copied from interface: NativeMemoryData
      Gets the object at the root of the hierarchy of native memory categories. The highest-level category is JRE. For more information, see the NativeMemoryCategory class.
      Specified by:
      getNativeMemoryRoot in interface NativeMemoryData
      Returns:
      the object at the root of the native memory hierarchy or null if no data has been retrieved.
    • getRecommendationLabel

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

      protected String getSubsystemLabel()
      Specified by:
      getSubsystemLabel in class HealthCenterDataImpl
    • 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.
    • getMaxFreePhysicalMemory

      public long getMaxFreePhysicalMemory()
      Description copied from interface: NativeMemoryData
      Gets the maximum amount of memory that is free on the monitored system in bytes.
      Specified by:
      getMaxFreePhysicalMemory in interface NativeMemoryData
      Returns:
      maximum memory in bytes
    • getMeanFreePhysicalMemory

      public double getMeanFreePhysicalMemory()
      Description copied from interface: NativeMemoryData
      Gets the mean amount of memory that is free on the monitored system in bytes.
      Specified by:
      getMeanFreePhysicalMemory in interface NativeMemoryData
      Returns:
      mean memory in bytes
    • getMinFreePhysicalMemory

      public long getMinFreePhysicalMemory()
      Description copied from interface: NativeMemoryData
      Gets the minimum amount of memory that is free on the monitored system in bytes.
      Specified by:
      getMinFreePhysicalMemory in interface NativeMemoryData
      Returns:
      minimum memory in bytes
    • getMaxProcessPhysicalMemory

      public long getMaxProcessPhysicalMemory()
      Description copied from interface: NativeMemoryData
      Gets the maximum amount of physical memory in use by the monitored process in bytes.
      Specified by:
      getMaxProcessPhysicalMemory in interface NativeMemoryData
      Returns:
      maximum memory in bytes
    • getMeanProcessPhysicalMemory

      public double getMeanProcessPhysicalMemory()
      Description copied from interface: NativeMemoryData
      Gets the mean amount of physical memory in use by the monitored process in bytes.
      Specified by:
      getMeanProcessPhysicalMemory in interface NativeMemoryData
      Returns:
      mean memory in bytes
    • getMinProcessPhysicalMemory

      public long getMinProcessPhysicalMemory()
      Description copied from interface: NativeMemoryData
      Gets the minimum amount of physical memory in use by the monitored process in bytes.
      Specified by:
      getMinProcessPhysicalMemory in interface NativeMemoryData
      Returns:
      minimum memory in bytes
    • getMaxProcessPrivateMemory

      public long getMaxProcessPrivateMemory()
      Description copied from interface: NativeMemoryData
      Gets the maximum amount of memory used exclusively by the monitored process, in bytes.
      Specified by:
      getMaxProcessPrivateMemory in interface NativeMemoryData
      Returns:
      maximum memory in bytes
    • getMeanProcessPrivateMemory

      public double getMeanProcessPrivateMemory()
      Description copied from interface: NativeMemoryData
      Gets the mean amount of memory used exclusively by the monitored process, in bytes.
      Specified by:
      getMeanProcessPrivateMemory in interface NativeMemoryData
      Returns:
      mean memory in bytes
    • getMinProcessPrivateMemory

      public long getMinProcessPrivateMemory()
      Description copied from interface: NativeMemoryData
      Gets the minimum amount of memory used exclusively by the monitored process, in bytes.
      Specified by:
      getMinProcessPrivateMemory in interface NativeMemoryData
      Returns:
      minimum memory in bytes
    • getMaxProcessVirtualMemory

      public long getMaxProcessVirtualMemory()
      Description copied from interface: NativeMemoryData
      Gets the maximum amount of total process address space used, in bytes.
      Specified by:
      getMaxProcessVirtualMemory in interface NativeMemoryData
      Returns:
      maximum memory in bytes
    • getMeanProcessVirtualMemory

      public double getMeanProcessVirtualMemory()
      Description copied from interface: NativeMemoryData
      Gets the mean amount of total process address space used, in bytes.
      Specified by:
      getMeanProcessVirtualMemory in interface NativeMemoryData
      Returns:
      mean memory in bytes
    • getMinProcessVirtualMemory

      public long getMinProcessVirtualMemory()
      Description copied from interface: NativeMemoryData
      Gets the minimum amount of total process address space used, in bytes.
      Specified by:
      getMinProcessVirtualMemory in interface NativeMemoryData
      Returns:
      minimum memory in bytes
    • addNativeMemoryListener

      public void addNativeMemoryListener(NativeMemoryEventListener listener)
      Description copied from interface: NativeMemoryData
      Add a listener for notification of when Native Memory events occur
      Specified by:
      addNativeMemoryListener in interface NativeMemoryData
    • removeNativeMemoryListener

      public void removeNativeMemoryListener(NativeMemoryEventListener listener)
      Description copied from interface: NativeMemoryData
      Remove one of the registered listeners.
      Specified by:
      removeNativeMemoryListener in interface NativeMemoryData
    • removeNativeMemoryCategoryListener

      public void removeNativeMemoryCategoryListener(NativeMemoryCategoryEventListener listener)
      Description copied from interface: NativeMemoryData
      Remove one of the registered listeners.
      Specified by:
      removeNativeMemoryCategoryListener in interface NativeMemoryData
    • addNativeMemoryCategoryListener

      public void addNativeMemoryCategoryListener(NativeMemoryCategoryEventListener listener)
      Description copied from interface: NativeMemoryData
      Add a listener for notification of when Native Memory Category events occur
      Specified by:
      addNativeMemoryCategoryListener in interface NativeMemoryData