public abstract class WorkerThread extends Thread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
protected static Logger |
log
Variable
log is a class logger. |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Constructor and Description |
---|
WorkerThread() |
Modifier and Type | Method and Description |
---|---|
long |
getAverageProcessingTime()
Method description
|
abstract WorkerThread |
getNewInstance()
Method description
|
long |
getRunsCounter()
Method description
|
boolean |
offer(QueueItem item)
Method description
|
abstract void |
process(QueueItem item)
Method description
|
void |
run() |
void |
setQueueMaxSize(int maxSize)
Method description
|
void |
shutdown() |
int |
size()
Method description
|
activeCount, 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, yield
protected static final Logger log
log
is a class logger.public abstract WorkerThread getNewInstance()
public abstract void process(QueueItem item)
item
- public long getAverageProcessingTime()
public long getRunsCounter()
public boolean offer(QueueItem item)
item
- public void setQueueMaxSize(int maxSize)
maxSize
- public int size()
public void shutdown()
Copyright © 2019 "Tigase, Inc.". All rights reserved.