Class VMUsage

  • All Implemented Interfaces:
    Serializable

    public class VMUsage
    extends Metric
    A subclass of Metric that observes memory usage and number of threads for the VM.
    See Also:
    Serialized Form
    • Constructor Detail

      • VMUsage

        public VMUsage​(String inLabel)
    • Method Detail

      • reset

        public void reset()
        Description copied from class: Metric
        Reset this Metric to its "zero" condition.
        Overrides:
        reset in class Metric
      • getSampleCount

        public int getSampleCount()
        Gets the sampleCount attribute of the VMUsage object
        Returns:
        The sampleCount value
      • getActiveThreads

        public int getActiveThreads()
        Gets the activeThreads attribute of the VMUsage object
        Returns:
        The activeThreads value
      • getActiveThreadsMinimum

        public int getActiveThreadsMinimum()
        Gets the activeThreadsMinimum attribute of the VMUsage object
        Returns:
        The activeThreadsMinimum value
      • getActiveThreadsMaximum

        public int getActiveThreadsMaximum()
        Gets the activeThreadsMaximum attribute of the VMUsage object
        Returns:
        The activeThreadsMaximum value
      • getActiveThreadsMean

        public float getActiveThreadsMean()
        Gets the activeThreadsMean attribute of the VMUsage object
        Returns:
        The activeThreadsMean value
      • getFreeMemory

        public long getFreeMemory()
        Gets the freeMemory attribute of the VMUsage object
        Returns:
        The freeMemory value
      • getFreeMemoryMinimum

        public long getFreeMemoryMinimum()
        Gets the freeMemoryMinimum attribute of the VMUsage object
        Returns:
        The freeMemoryMinimum value
      • getFreeMemoryMaximum

        public long getFreeMemoryMaximum()
        Gets the freeMemoryMaximum attribute of the VMUsage object
        Returns:
        The freeMemoryMaximum value
      • getFreeMemoryMean

        public double getFreeMemoryMean()
        Gets the freeMemoryMean attribute of the VMUsage object
        Returns:
        The freeMemoryMean value
      • getTotalMemory

        public long getTotalMemory()
        Gets the totalMemory attribute of the VMUsage object
        Returns:
        The totalMemory value
      • getTotalMemoryMinimum

        public long getTotalMemoryMinimum()
        Gets the totalMemoryMinimum attribute of the VMUsage object
        Returns:
        The totalMemoryMinimum value
      • getTotalMemoryMaximum

        public long getTotalMemoryMaximum()
        Gets the totalMemoryMaximum attribute of the VMUsage object
        Returns:
        The totalMemoryMaximum value
      • getTotalMemoryMean

        public double getTotalMemoryMean()
        Gets the totalMemoryMean attribute of the VMUsage object
        Returns:
        The totalMemoryMean value
      • getTotalIntervals

        public long getTotalIntervals()
        Gets the totalIntervals attribute of the VMUsage object
        Overrides:
        getTotalIntervals in class Metric
        Returns:
        0 since VMUsage does not use intervals
      • add

        public void add​(int inCount)
        Take a sample of the current values from the VM.
        Specified by:
        add in class Metric
        Parameters:
        inCount - is ignored
      • getCount

        public long getCount()
        Description copied from class: Metric
        Gets the total count of events.
        Specified by:
        getCount in class Metric
        Returns:
        count