Module EDActionCluster :: Class EDActionCluster
[hide private]
[frames] | no frames]

Class EDActionCluster

source code

        object --+            
                 |            
 EDObject.EDObject --+        
                     |        
   EDLogging.EDLogging --+    
                         |    
        object --+       |    
                 |       |    
threading._Verbose --+   |    
                     |   |    
      threading.Thread --+    
                         |    
         EDAction.EDAction --+
                             |
                            EDActionCluster

This class is used for creating a "cluster" of actions (e.g. plugins) that are launched in parallel and then synchronized.

Instance Methods [hide private]
 
__init__(self, _iNoThreads=None)
Initalises the action cluster.
source code
 
process(self, _edPlugin=None)
Executes the action cluster.
source code
 
__semaphoreRelease(self, _edAction=None)
This private method is called if the edAction executed as part of the action cluster is a success.
source code
 
__setActionClusterFailure(self, _edAction=None)
This is a private method that sets the EDActioCluster instance to failure if one of the actions ends in failure.
source code
 
addAction(self, _edAction)
This method adds an action (e.g.
source code
 
setClusterSize(self, _iNoThreads)
This method forces the number of threads to be used of the action cluster.
source code

Inherited from EDAction.EDAction: abort, addExtraTime, connectFAILURE, connectFinallyProcess, connectPostProcess, connectPreProcess, connectProcess, connectSUCCESS, execute, executeAction, executeActionSynchronous, executeKernel, executeSynchronous, finallyProcess, getDefaultTimeOut, getLogTiming, getSlotFAILURE, getSlotSUCCESS, getTimeOut, hasTimedOut, isEnded, isFailure, isRunning, isStarted, isTimeOut, postProcess, preProcess, run, setFailure, setLogTiming, setTimeOut, synchronize

Inherited from EDLogging.EDLogging: ASSERT, DEBUG, ERROR, WARNING, error, isVerboseDebug, log, screen, setAllLogLevels, setLogFileName, setLogFileOff, setLogLevel, setTestOff, setTestOn, setVerboseDebugOff, setVerboseDebugOn, setVerboseOff, setVerboseOn, unitTest, warning, writeErrorTrace

Inherited from EDObject.EDObject: getClassName, getId, getRunTime, getSemaphoreValue, getTimeEnd, getTimeInit, locked, setTimeEnd, setTimeInit, synchronizeOff, synchronizeOn

Inherited from threading.Thread: __repr__, getName, isAlive, isDaemon, is_alive, join, setDaemon, setName, start

Inherited from threading.Thread (private): _reset_internal_locks, _set_daemon, _set_ident

Inherited from threading._Verbose (private): _note

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables [hide private]

Inherited from EDLogging.EDLogging (private): _EDObject__iId_class

Properties [hide private]

Inherited from EDAction.EDAction: logTiming

Inherited from threading.Thread: daemon, ident, name

Inherited from threading.Thread (private): _block

Inherited from object: __class__

Method Details [hide private]

__init__(self, _iNoThreads=None)
(Constructor)

source code 

Initalises the action cluster. The max number of threads to be used can be forced, if omitted the number of processors number of threads

Parameters:
  • _iNoThreads (integer) - max number of threads to be used
Overrides: object.__init__

process(self, _edPlugin=None)

source code 

Executes the action cluster. This method will return only when all actions have finished.

Overrides: EDAction.EDAction.process

__semaphoreRelease(self, _edAction=None)

source code 

This private method is called if the edAction executed as part of the action cluster is a success. It will release one thread from the semaphore of the action so that a new thread can be started.

addAction(self, _edAction)

source code 

This method adds an action (e.g. plugin) to the list of actions to be executed in parallel.

Parameters:
  • _edAction (EDAction) - an actiond, e.g. a plugin

setClusterSize(self, _iNoThreads)

source code 

This method forces the number of threads to be used of the action cluster.

Parameters:
  • _iNoThreads (integer) - max number of threads to be used