Package elisa :: Package plugins :: Package good :: Package testing :: Module threads_monitor :: Class ThreadsMonitor
[hide private]
[frames] | no frames]

Class ThreadsMonitor

source code



Service checking periodically the current number of threads
and giving a warning if a certain limit is reached.

Warning: this component only takes into account threads created from
         Python



Nested Classes [hide private]

Inherited from core.component.Component: __metaclass__

Instance Methods [hide private]
 
initialize(self)
Initialize various variables internal to the Component.
source code
 
start(self)
Start the service.
source code
 
stop(self)
Stop the service.
source code
 
_check(self) source code

Inherited from core.component.Component: __init__, clean, load_config, save_config

Inherited from extern.log.log.Loggable: debug, doLog, error, info, log, logFunction, logObjectName, warning, warningFailure

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __str__

Static Methods [hide private]

Inherited from core.component.Component: __classinit__

Class Variables [hide private]
dict default_config = {'frequency': '1.0', 'max_threads': '2'}
used when nothing found in Application's config
dict config_doc = {'frequency': 'Frequency of the monitoring in tim...
documentation for each option of the default configuration.
string name = 'threads_monitor'
Component's name

Inherited from core.component.Component: checked, id, plugin

Inherited from extern.log.log.Loggable: logCategory

Instance Variables [hide private]

Inherited from core.component.Component: config, path

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

initialize(self)

source code 

Initialize various variables internal to the Component.

This method is called by the plugin_registry after the component's config has been loaded.

Override this method if you need to perform some initializations that would normally go in Component's constructor but can't be done there because they require access to the component's config.
Overrides: core.component.Component.initialize
(inherited documentation)

start(self)

source code 

Start the service.

DOCME more
Overrides: base_components.service_provider.ServiceProvider.start
(inherited documentation)

stop(self)

source code 

Stop the service.

DOCME more
Overrides: base_components.service_provider.ServiceProvider.stop
(inherited documentation)

Class Variable Details [hide private]

config_doc

documentation for each option of the default configuration. Keys should be same as the ones in default_config and values should be strings
Type:
dict
Value:
{'frequency': 'Frequency of the monitoring in times per second',
 'max_threads': 'Maximum number of threads at any time.'}