Class PerformanceMonitorManager


  • public class PerformanceMonitorManager
    extends java.lang.Object
    The MonitorManager class manages all Monitor objects in memory on the Web Server. This class will give out Monitor objects to callers, and ensures that only one Monitor exists for each Intelligence Server being monitored. In order to obtain a MonitorManager instance, call the static getInstance method.

    Also note that all objects in the performance monitoring admin package are fully thread-safe, and can be used concurrently by multiple threads without any multithreading-related problems.

    Since:
    MicroStrategy Web 7.5.0
    • Method Detail

      • getInstance

        public static PerformanceMonitorManager getInstance()
        Returns a MonitorManager instance which can be used to obtain Monitor objects.
        Returns:
        A valid MonitorManager object.
      • setTimeout

        public void setTimeout​(int timeoutInSecs)
        Sets the timeout on the Monitor objects. If the Monitor is not accessed for this length of time, it may be automatically destroyed. Note that this may be set to 0 to ensure that Monitor objects are never cleaned up, but this behavior is not recommended.
        Parameters:
        timeoutInSecs - The timeout to use for the Monitor objects, in seconds. The default is 900 seconds (15 minutes).
      • getTimeout

        public int getTimeout()
        Returns the currently set timeout on the Monitor objects. If the Monitor is not accessed for this length of time, it may be automatically destroyed.
        Returns:
        The current monitor timeout, in seconds.
      • setListRefresh

        public void setListRefresh​(int refreshInSecs)
        Sets the list refresh rate. This setting will determine how often the available counter list on all Monitors will be updated.
        Parameters:
        refreshInSecs - The refresh rate of the available counter list. The default is 600 seconds (10 minutes).
      • getListRefresh

        public int getListRefresh()
        Returns the currently set list refresh rate. This setting will determine how often the available counter list on all Monitors will be updated.
        Returns:
        The refresh rate of the available counter list, in seconds.
      • setMonitoringFrequency

        public void setMonitoringFrequency​(int frequencyInSecs)
        Sets the monitors' monitoring frequency. This setting will determine how often the Monitor objects will poll the Intelligence Server to obtain performance data.
        Parameters:
        frequencyInSecs - The monitoring frequency to use for all monitor objects, in seconds. By default, this value is 5 seconds.
      • getMonitoringFrequency

        public int getMonitoringFrequency()
        Returns the monitors' current monitoring frequency. This setting will determine how often the Monitor objects will poll the Intelligence Server to obtain performance data.
        Returns:
        The monitoring frequency in use for all monitor objects, in seconds.
      • getMonitorInstance

        public PerformanceMonitorInstance getMonitorInstance​(java.lang.String serverName,
                                                             WebIServerSession session)
                                                      throws java.lang.IllegalArgumentException
        Returns a Monitor object which can be used to examine performance counters on the given Intelligence Server. The WebIServerSession object will be used to ensure that the caller has the correct permissions to access the Monitor.
        Parameters:
        serverName - The name of the server to retrieve a Monitor for.
        session - A WebIServerSession object which contains a valid session on the cluster that the Intelligence Server exists upon.
        Returns:
        A Monitor object corresponding to the given Intelligence Server.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the credentials are not valid for the given Intelligence Server.
      • releaseMonitorInstance

        public void releaseMonitorInstance​(java.lang.String serverName,
                                           WebIServerSession session)
                                    throws java.lang.IllegalArgumentException
        Destroys the Monitor for the given server. Used to clean up the Monitor object from memory. Note that the Monitor is shared across all threads, and this will fully clean up the Monitor associated with the server for all threads.
        Parameters:
        serverName - The name of the server to clean up the Monitor for.
        session - A WebIServerSession object which contains a valid session on the cluster that the Intelligence Server exists upon.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the credentials are not valid for the given Intelligence Server.
      • setHistorySize

        public void setHistorySize​(int historySize)
      • getHistorySize

        public int getHistorySize()