Package com.microstrategy.web.beans
Class PerformanceMonitorBeanManager
- java.lang.Object
-
- com.microstrategy.web.beans.PerformanceMonitorBeanManager
-
public class PerformanceMonitorBeanManager extends java.lang.Object
ThePerformanceMonitorBeanManager
has two purposes: (1) to act as a factory forPerformanceMonitorBean
objects, and (2) to provide a persistence mechanism for them. APerformanceMonitorBean
is meant to represent one set of performance counters across Intelligence Servers in a cluster. The model being advocated is that onePerformanceMonitorBean
corresponds to one graph object. Note that thePerformanceMonitorBean
is thread-safe, even with multiple threads sharing the same instance, but thePerformanceMonitorBean
instances 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 void
freeMonitorBean(java.lang.String identifier)
This method will release thePerformanceMonitorBean
with the given identifer (if any) from the MonitorBeanManager's persistence mechanism.static PerformanceMonitorBeanManager
getInstance()
Returns an instance of the MonitorBeanManager object.PerformanceMonitorBean
getMonitorBean(java.lang.String identifier)
This method will return a saved monitor bean with the given identifier.int
getMonitorBeanTimeout()
This method will return the current value of the timeout of beans saved using the saveMonitorBean method.PerformanceMonitorBean
newMonitorBean()
This method will return a newPerformanceMonitorBean
object.java.lang.String
saveMonitorBean(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.void
setMonitorBeanTimeout(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 savePerformanceMonitorBean
objects.- Returns:
- An instance of the MonitorBeanManager object.
-
newMonitorBean
public PerformanceMonitorBean newMonitorBean()
This method will return a newPerformanceMonitorBean
object.- Returns:
- A new
PerformanceMonitorBean
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 thePerformanceMonitorBean
with the given identifer (if any) from the MonitorBeanManager's persistence mechanism.- Parameters:
identifier
- The identifier of the bean to delete.
-
-