Package com.logicaldoc.core.system
Class SystemLoadMonitor
java.lang.Object
com.logicaldoc.core.system.SystemLoadMonitor
This class monitors the system load and notifies the listeners accordingly
- Since:
- 6.7.1
- Author:
- Marco Meschieri - LogicalDOC
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidaddListener(SystemLoadListener listener) intRetrieve the CPU load.booleanCheck if the 'average' CPU load is over the limit defined in 'system.cpuload.max' config parameter.voidremoveListener(SystemLoadListener listener) voidstart()voidstop()
- 
Constructor Details- 
SystemLoadMonitorpublic SystemLoadMonitor()
 
- 
- 
Method Details- 
addListener
- 
removeListener
- 
getCpuLoadpublic int getCpuLoad()Retrieve the CPU load.- Returns:
- current CPU load
 
- 
isAverageCpuOverLoadedpublic boolean isAverageCpuOverLoaded()Check if the 'average' CPU load is over the limit defined in 'system.cpuload.max' config parameter.- Returns:
- if the CPU is overloaded
 
- 
start@PostConstruct public void start()
- 
stop@PreDestroy public void stop()
 
-