public abstract class AbstractTaskWorker2 extends java.lang.Object implements java.lang.Runnable, TaskWorker, java.io.Closeable
Modifier | Constructor and Description |
---|---|
protected |
AbstractTaskWorker2(java.lang.ClassLoader classLoader) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
protected java.lang.ClassLoader |
getClassLoader() |
protected long |
getCurrentTimeActual() |
java.lang.String |
getState() |
protected java.lang.String |
getThreadName() |
boolean |
isClosed() |
protected boolean |
isPermanent() |
protected boolean |
isRetry() |
boolean |
isTaskActive() |
protected boolean |
isWeakClose() |
protected void |
onThreadComplete() |
protected void |
onThreadStart() |
void |
run() |
abstract long |
runTask() |
protected void |
setWorkerIdleTimeout(long timeout) |
protected abstract void |
startWorkerThread() |
java.lang.String |
toString() |
protected void |
unpark(java.lang.Thread thread) |
void |
wake() |
protected AbstractTaskWorker2(java.lang.ClassLoader classLoader)
protected boolean isWeakClose()
protected boolean isPermanent()
protected void setWorkerIdleTimeout(long timeout)
public final boolean isTaskActive()
public boolean isClosed()
public java.lang.String getState()
protected java.lang.ClassLoader getClassLoader()
public abstract long runTask()
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
public final void wake()
wake
in interface TaskWorker
protected abstract void startWorkerThread()
protected void unpark(java.lang.Thread thread)
protected java.lang.String getThreadName()
protected boolean isRetry()
protected void onThreadStart()
protected void onThreadComplete()
public final void run()
run
in interface java.lang.Runnable
protected long getCurrentTimeActual()
public java.lang.String toString()
toString
in class java.lang.Object