| |
|
| java.lang.Object com.knowgate.scheduler.WorkerThreadPool
WorkerThreadPool | public class WorkerThreadPool (Code) | | WorkerThread Pool
author: Sergio Montoro Ten version: 3.0 |
Constructor Summary | |
public | WorkerThreadPool(AtomConsumer oAtomConsumer, Properties oEnvironmentProps) Create WorkerThreadPool
thread Pool size is readed from maxschedulerthreads property of oEnvironmentProps,
the default value is 1. |
WorkerThreadPool | public WorkerThreadPool(AtomConsumer oAtomConsumer, Properties oEnvironmentProps)(Code) | | Create WorkerThreadPool
thread Pool size is readed from maxschedulerthreads property of oEnvironmentProps,
the default value is 1.
Each thread is given the name WorkerThread_n
Parameters: oAtomConsumer - Atom Consumer Object to be used Parameters: oEnvironmentProps - Environment Properties collection(usually readed from hipergate.cnf) |
getProperties | public Properties getProperties()(Code) | | Get Environment properties collection from hipergate.cnf
|
getRunningTimeMS | public long getRunningTimeMS()(Code) | | |
haltAll | public void haltAll()(Code) | | Halt all pooled threads commiting any pending operations before stoping
If a thread is dead-locked by any reason halting it will not cause any effect.
halt() method only sends a signals to the each WokerThread telling it that must
finish pending operations and stop.
|
launchAll | public void launchAll()(Code) | | Launch all WorkerThreads and start consuming atoms from queue.
|
livethreads | public int livethreads()(Code) | | Count of currently active WorkerThreads
|
runningAtoms | public Atom[] runningAtoms()(Code) | | Get array of atoms currently running at live WorkerThreads
Atom[] since: 3.0 |
runningJobs | public String[] runningJobs()(Code) | | Get array with GUIDs of Jobs currently run by live WorkerThreads
String[] Job GUID array since: 3.0 |
size | public int size()(Code) | | Get Pool Size
|
stopAll | public void stopAll()(Code) | | Call stop() on every thread of the pool which is alive
This method should only be used when threads cannot be stopped by calling
haltAll()
|
stopAll | public void stopAll(JDCConnection oConn) throws SQLException(Code) | | Call stop() on every thread of the pool which is alive
All running atoms are set to STATUS_INTERRUPTED
since: 3.0 |
unregisterCallback | public void unregisterCallback(String sCallbackName)(Code) | | Unregister a thread callback object for each thread in this pool
Parameters: sCallbackName - Name of callback to be unregistered |
|
|
|