com.ibm.java.diagnostics.healthcenter.api

Class HealthCenterPreferences

  • java.lang.Object
    • com.ibm.java.diagnostics.healthcenter.api.HealthCenterPreferences


  • public class HealthCenterPreferences
    extends java.lang.Object
    This class allows applications to retrieve or set various preferences that are relevant to the HealthCenter class. The HealthCenter class represents the connection to the monitored application, or to data loaded from a file.
    • Constructor Summary

      Constructors 
      Constructor and Description
      HealthCenterPreferences()
      Initializes the default set of preferences.
    • Constructor Detail

      • HealthCenterPreferences

        public HealthCenterPreferences()
        Initializes the default set of preferences.
    • Method Detail

      • setSlidingWindowTruncation

        public void setSlidingWindowTruncation(boolean value)
        Turns the sliding window truncation facility on or off.
        Parameters:
        value - whether the truncation facility is on or off.
      • setTruncationTimeWindow

        public void setTruncationTimeWindow(int minutes)
        Sets the amount of data to keep when the truncation job runs.
        Parameters:
        minutes - the amount of data to keep, in minutes.
      • setBackingStoreCount

        public void setBackingStoreCount(int count)
        Sets the number of backing files to be used. This determines how much of the data can be saved for offline analysis later. The default of 5 should be sufficient to provide many days worth of continual monitoring.
        Parameters:
        count - the number of files to use.
      • setTruncationRunInterval

        public void setTruncationRunInterval(int seconds)
        Sets the frequency for the truncation job.
        Parameters:
        seconds - the required frequency for the truncation job, in seconds.
      • getSlidingWindowTruncation

        public boolean getSlidingWindowTruncation()
        Gets whether the sliding window truncation facility is on or off.
        Returns:
        true or false.
      • getTruncationTimeWindow

        public int getTruncationTimeWindow()
        Gets the amount of data that is kept when the truncation job runs.
        Returns:
        the amount of data that is kept, in minutes.
      • getTruncationRunInterval

        public int getTruncationRunInterval()
        Gets the frequency of the truncation job.
        Returns:
        the frequency of the truncation job, in seconds.
      • setDefaults

        public void setDefaults()
        Initializes the HealthCenter preferences to their default values.
      • setMemoryRestictionEnabled

        public void setMemoryRestictionEnabled(boolean memoryRestrictionEnabled)
        Sets whether to set memory restriction on or off. The default is ON. This value makes the Health Center process restrict the amount of memory that it uses.
        Parameters:
        memoryRestrictionEnabled - true or false
      • isMemoryRestictionEnabled

        public boolean isMemoryRestictionEnabled()
        Gets the current value of whether memory restriction is set.
        Returns:
        boolean
      • setMemoryRestriction

        public long setMemoryRestriction(long maxMemoryToUse)
        Sets the maximum amount of memory to be used by the Health Center process. If this value is not larger than the default of 200mb then the default is used instead.
        Parameters:
        maxMemoryToUse - the value of the memory to use, in bytes.
        Returns:
        the value of the memory that is actually set, after applying the condition listed previously.
      • getMemoryRestriction

        public long getMemoryRestriction()
        Gets the value of the memory restriction
        Returns:
        the value of the memory that is actually set
      • useBackingStorage

        public void useBackingStorage(boolean value)
        When monitoring a live connection, data will be stored to local temporary files so that should you wish to save the data for later analysis, you can do with the saveData(File) method. Setting this to false will conserve disk space but you will be unable to save any data. By default, event only mode has this set to false so that backing storage is not enabled
        Parameters:
        value - true or false to turn on or off
© Copyright 2012, 2016 IBM Corporation.