public abstract class AbstractQueueRunnable<T> extends Thread
Thread.State, Thread.UncaughtExceptionHandler| Modifier and Type | Field and Description |
|---|---|
protected boolean |
autoClose |
protected long |
closeAfter |
protected long |
currentTimestamp |
protected BlockingQueue<T> |
queue |
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
AbstractQueueRunnable(int maxQueueSize) |
AbstractQueueRunnable(int maxQueueSize,
int closeAfter) |
| Modifier and Type | Method and Description |
|---|---|
void |
add(T data) |
protected abstract void |
doNext(T data) |
void |
interrupt() |
void |
run() |
activeCount, checkAccess, clone, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yieldprotected BlockingQueue<T> queue
protected long closeAfter
protected long currentTimestamp
protected boolean autoClose
public AbstractQueueRunnable(int maxQueueSize,
int closeAfter)
public AbstractQueueRunnable(int maxQueueSize)
public void add(T data) throws InterruptedException
InterruptedExceptionCopyright © 2019. All rights reserved.