Class PerformanceMonitorManager
- java.lang.Object
-
- com.microstrategy.web.objects.admin.monitors.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 Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getHistorySize()
static PerformanceMonitorManager
getInstance()
Returns a MonitorManager instance which can be used to obtain Monitor objects.int
getListRefresh()
Returns the currently set list refresh rate.int
getMonitoringFrequency()
Returns the monitors' current monitoring frequency.PerformanceMonitorInstance
getMonitorInstance(java.lang.String serverName, WebIServerSession session)
Returns a Monitor object which can be used to examine performance counters on the given Intelligence Server.int
getTimeout()
Returns the currently set timeout on the Monitor objects.boolean
isServerMonitoringEnabled(WebIServerSession session)
void
releaseMonitorInstance(java.lang.String serverName, WebIServerSession session)
Destroys the Monitor for the given server.void
setHistorySize(int historySize)
void
setListRefresh(int refreshInSecs)
Sets the list refresh rate.void
setMonitoringFrequency(int frequencyInSecs)
Sets the monitors' monitoring frequency.void
setServerMonitoringEnabled(WebIServerSession session, boolean isEnabled)
void
setTimeout(int timeoutInSecs)
Sets the timeout on the Monitor objects.
-
-
-
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. TheWebIServerSession
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
- AWebIServerSession
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
- AWebIServerSession
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.
-
isServerMonitoringEnabled
public boolean isServerMonitoringEnabled(WebIServerSession session) throws WebObjectsException, WebObjectsAdminException
- Throws:
WebObjectsException
WebObjectsAdminException
- Since:
- MicroStrategy Web 7.5.2
-
setServerMonitoringEnabled
public void setServerMonitoringEnabled(WebIServerSession session, boolean isEnabled) throws WebObjectsException, WebObjectsAdminException
- Throws:
WebObjectsException
WebObjectsAdminException
- Since:
- MicroStrategy Web 7.5.2
-
setHistorySize
public void setHistorySize(int historySize)
-
getHistorySize
public int getHistorySize()
-
-