Package com.microstrategy.web.beans
Class PerformanceMonitorBeanManager
- java.lang.Object
-
- com.microstrategy.web.beans.PerformanceMonitorBeanManager
-
public class PerformanceMonitorBeanManager extends java.lang.ObjectThePerformanceMonitorBeanManagerhas two purposes: (1) to act as a factory forPerformanceMonitorBeanobjects, and (2) to provide a persistence mechanism for them. APerformanceMonitorBeanis meant to represent one set of performance counters across Intelligence Servers in a cluster. The model being advocated is that onePerformanceMonitorBeancorresponds to one graph object. Note that thePerformanceMonitorBeanis thread-safe, even with multiple threads sharing the same instance, but thePerformanceMonitorBeaninstances it gives out are only thread-safe in the usage scenario of one instance per thread.- Since:
- MicroStrategy Web 7.5.0
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfreeMonitorBean(java.lang.String identifier)This method will release thePerformanceMonitorBeanwith the given identifer (if any) from the MonitorBeanManager's persistence mechanism.static PerformanceMonitorBeanManagergetInstance()Returns an instance of the MonitorBeanManager object.PerformanceMonitorBeangetMonitorBean(java.lang.String identifier)This method will return a saved monitor bean with the given identifier.intgetMonitorBeanTimeout()This method will return the current value of the timeout of beans saved using the saveMonitorBean method.PerformanceMonitorBeannewMonitorBean()This method will return a newPerformanceMonitorBeanobject.java.lang.StringsaveMonitorBean(PerformanceMonitorBean bean)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.voidsetMonitorBeanTimeout(int timeoutInSecs)This method will set the timeout of beans saved using the saveMonitorBean method.
-
-
-
Method Detail
-
getInstance
public static PerformanceMonitorBeanManager getInstance()
Returns an instance of the MonitorBeanManager object. This object can then be used to obtain and savePerformanceMonitorBeanobjects.- Returns:
- An instance of the MonitorBeanManager object.
-
newMonitorBean
public PerformanceMonitorBean newMonitorBean()
This method will return a newPerformanceMonitorBeanobject.- Returns:
- A new
PerformanceMonitorBeanobject.
-
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
PerformanceMonitorBeanobject. - 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 thePerformanceMonitorBeanwith the given identifer (if any) from the MonitorBeanManager's persistence mechanism.- Parameters:
identifier- The identifier of the bean to delete.
-
-