Package com.biglybt.core.util
Class ThreadPoolTask
- java.lang.Object
-
- com.biglybt.core.util.AERunnable
-
- com.biglybt.core.util.ThreadPoolTask
-
- All Implemented Interfaces:
java.lang.Runnable
- Direct Known Subclasses:
ClientIDManagerImpl.httpFilter
,DHTControlImpl.DhtTask
,TimerEvent
,TRTrackerServerProcessor
public abstract class ThreadPoolTask extends AERunnable
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.biglybt.core.util.AERunnable
AERunnable.AERunnableNamed
-
-
Field Summary
Fields Modifier and Type Field Description private int
manualRelease
(package private) static int
RELEASE_AUTO
(package private) static int
RELEASE_MANUAL
(package private) static int
RELEASE_MANUAL_ALLOWED
protected ThreadPool.threadPoolWorker
worker
-
Constructor Summary
Constructors Constructor Description ThreadPoolTask()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description (package private) boolean
canManualRelease()
java.lang.String
getName()
java.lang.String
getTaskState()
abstract void
interruptTask()
(package private) boolean
isAutoReleaseAndAllowManual()
only invoke this method after the first run of the threadpooltask as it is only meant to update the state of a task when it has child tasks and thus is running in manual release mode(package private) void
join()
only invoke this method after the first run of the threadpooltask as it is only meant to join on a task when it has child tasks and thus is running in manual release modevoid
releaseToPool()
(package private) void
setManualRelease()
void
setTaskState(java.lang.String state)
void
taskCompleted()
void
taskStarted()
-
Methods inherited from class com.biglybt.core.util.AERunnable
create, run, runSupport
-
-
-
-
Field Detail
-
RELEASE_AUTO
static final int RELEASE_AUTO
- See Also:
- Constant Field Values
-
RELEASE_MANUAL
static final int RELEASE_MANUAL
- See Also:
- Constant Field Values
-
RELEASE_MANUAL_ALLOWED
static final int RELEASE_MANUAL_ALLOWED
- See Also:
- Constant Field Values
-
manualRelease
private int manualRelease
-
worker
protected ThreadPool.threadPoolWorker worker
-
-
Method Detail
-
setTaskState
public void setTaskState(java.lang.String state)
-
getTaskState
public java.lang.String getTaskState()
-
getName
public java.lang.String getName()
-
interruptTask
public abstract void interruptTask()
-
taskStarted
public void taskStarted()
-
taskCompleted
public void taskCompleted()
-
join
final void join()
only invoke this method after the first run of the threadpooltask as it is only meant to join on a task when it has child tasks and thus is running in manual release mode
-
setManualRelease
final void setManualRelease()
-
canManualRelease
final boolean canManualRelease()
-
isAutoReleaseAndAllowManual
final boolean isAutoReleaseAndAllowManual()
only invoke this method after the first run of the threadpooltask as it is only meant to update the state of a task when it has child tasks and thus is running in manual release mode
-
releaseToPool
public final void releaseToPool()
-
-