Class PerformanceMonitorBeanManager


  • public class PerformanceMonitorBeanManager
    extends java.lang.Object
    The PerformanceMonitorBeanManager has two purposes: (1) to act as a factory for PerformanceMonitorBean objects, and (2) to provide a persistence mechanism for them. A PerformanceMonitorBean is meant to represent one set of performance counters across Intelligence Servers in a cluster. The model being advocated is that one PerformanceMonitorBean corresponds to one graph object. Note that the PerformanceMonitorBean is thread-safe, even with multiple threads sharing the same instance, but the PerformanceMonitorBean instances it gives out are only thread-safe in the usage scenario of one instance per thread.
    Since:
    MicroStrategy Web 7.5.0
    • Method Detail

      • getInstance

        public static PerformanceMonitorBeanManager getInstance()
        Returns an instance of the MonitorBeanManager object. This object can then be used to obtain and save PerformanceMonitorBean objects.
        Returns:
        An instance of the MonitorBeanManager object.
      • setMonitorBeanTimeout

        public void setMonitorBeanTimeout​(int timeoutInSecs)
        This method will set the timeout of beans saved using the saveMonitorBean method. If a bean is not accessed within the specified time, it will be destroyed.
        Parameters:
        timeoutInSecs - The timeout of saved beans, in seconds.
      • getMonitorBeanTimeout

        public int getMonitorBeanTimeout()
        This method will return the current value of the timeout of beans saved using the saveMonitorBean method.
        Returns:
        The current monitor bean timeout, in seconds.
      • saveMonitorBean

        public java.lang.String saveMonitorBean​(PerformanceMonitorBean bean)
                                         throws CacheException,
                                                java.lang.IllegalArgumentException
        This method will save the given monitor bean into the MonitorBeanManager, and return an identifier which can be used to retrieve the monitor bean at a future time.
        Parameters:
        bean - The bean to save.
        Returns:
        A String identifier which is used with the getMonitorBean method to retrieve the saved MonitorBean.
        Throws:
        CacheException - Thrown if an error occurs when saving the bean.
        java.lang.IllegalArgumentException - thrown if an invalid bean(null) is passed.
      • getMonitorBean

        public PerformanceMonitorBean getMonitorBean​(java.lang.String identifier)
                                              throws java.lang.IllegalArgumentException
        This method will return a saved monitor bean with the given identifier.
        Parameters:
        identifier - The String identifier of the monitor bean.
        Returns:
        The saved PerformanceMonitorBean object.
        Throws:
        java.lang.IllegalArgumentException - Thrown if the given identifier does not exist in the MonitorBeanManager.
      • freeMonitorBean

        public void freeMonitorBean​(java.lang.String identifier)
        This method will release the PerformanceMonitorBean with the given identifer (if any) from the MonitorBeanManager's persistence mechanism.
        Parameters:
        identifier - The identifier of the bean to delete.