public class WorkerThread extends FrameworkBaseThread
WorkerThread is used to handle the perform work
request by the pool and have the worker actually perform the work.
Note if PoolMgr is null then this thread is managed separately
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected MessageIntf |
msg |
protected PoolMgr |
poolMgr |
protected ServicesIntf |
service |
initMessage, serviceDataMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITYCATEGROY_ADAPTER, CATEGROY_APP, CATEGROY_DB_CON, CATEGROY_DB_POOL, CATEGROY_ENGINE, CATEGROY_MODULE, CATEGROY_POOL_MGR, CATEGROY_QUEUE, CATEGROY_THREAD_MGR, CATEGROY_WORKER, COMMAND_DEREGISTER_KEY, COMMAND_PAUSE, COMMAND_REGISTER_KEY, COMMAND_RESTART, COMMAND_SHUTDOWN, COMMAND_START, COMMAND_STOP, FLAG_FALSE, FLAG_TRUE, PARAM_JVM_STR, PARAM_JVMID_STR, PARAM_SERVERNAME_STR, PARAM_SERVICEACTIVE_STR, PARAM_SERVICECATAGORY_STR, PARAM_SERVICENAME_STR, PARAM_SERVICERUNNING_STR, TYPE_CLUSTER, TYPE_DISPLAY_STR, TYPE_EVENT, TYPE_JVM, TYPE_JVM_STR, TYPE_MAX, TYPE_SERVER, TYPE_SERVICE| Constructor and Description |
|---|
WorkerThread(PoolMgr aPoolMgr,
String anId,
ServicesIntf aService)
Creates a new WorkThreadThread
|
| Modifier and Type | Method and Description |
|---|---|
int |
getDefError() |
long |
getLastUse()
Will return the time in millis of last activity
|
ServicesIntf |
getServiceIntf() |
void |
init()
This method will initialize the worker thread
|
boolean |
isActive() |
void |
run()
WorkerThread's thread routine
|
void |
shutdown()
This method is called to gracefully shutdown, stop the threads and
free resources.
|
addInProcess, addTotalErrorNumber, addTotalMsgNumber, addTotalProcessed, deRegister, deRegister, doEventMessage, doMessage, getInProcess, getJvmId, getJvmService, getService, getServiceData, getServiceName, getStats, getTotalErrorNumber, getTotalMsgNumber, getTotalProcessed, initMessage, isRunning, register, register, resetTotals, setActive, setRunning, setServiceData, subtractInProcessactiveCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldequals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetNameprotected PoolMgr poolMgr
protected ServicesIntf service
protected MessageIntf msg
public WorkerThread(PoolMgr aPoolMgr, String anId, ServicesIntf aService)
aPoolMgr - PoolMgr Poll Manager to manage the threads or nullanId - String Thread IDaService - Worker instance associated with the WorkerThreadpublic void init()
public boolean isActive()
isActive in interface FrameworkIntfisActive in class FrameworkBaseThreadpublic long getLastUse()
public ServicesIntf getServiceIntf()
public void run()
public void shutdown()
public int getDefError()
getDefError in class FrameworkBaseThreadCopyright © 2020. All rights reserved.