Package com.logicaldoc.core.system

# Class SystemLoadMonitor

java.lang.Object
com.logicaldoc.core.system.SystemLoadMonitor

@Component("systemLoadMonitor") public class SystemLoadMonitor extends Object
This class monitors the system load and notifies the listeners accordingly

Since:
  6.7.1
Author:
  Marco Meschieri - LogicalDOC

## Constructor Summary

Constructors
Constructor
Description
`SystemLoadMonitor()`

## Method Summary

Modifier and Type
Method
Description
`void`
`addListener(SystemLoadListener listener)`
`int`
`getCpuLoad()`
Retrieve the CPU load.
`boolean`
`isAverageCpuOverLoaded()`
Check if the 'average' CPU load is over the limit defined in 'system.cpuload.max' config parameter.
`void`
`removeListener(SystemLoadListener listener)`
`void`
`start()`
`void`
`stop()`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### SystemLoadMonitor

public SystemLoadMonitor()

## Method Details

### addListener

public void addListener(SystemLoadListener listener)

### removeListener

public void removeListener(SystemLoadListener listener)

### getCpuLoad

public int getCpuLoad()
Retrieve the CPU load.

Returns:
  current CPU load

### isAverageCpuOverLoaded

public 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()