Class ThreadPoolTask
java.lang.Object
com.biglybt.core.util.AERunnable
com.biglybt.core.util.ThreadPoolTask
- All Implemented Interfaces:
Runnable
- Direct Known Subclasses:
ClientIDManagerImpl.httpFilter, DHTControlImpl.DhtTask, TimerEvent, TRTrackerServerProcessor
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from class AERunnable
AERunnable.AERunnableNamed -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ReentrantLockprivate intprivate boolean(package private) static final int(package private) static final int(package private) static final intprotected ThreadPoolTask.Worker -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) final booleanabstract void(package private) final booleanonly 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) final voidjoin()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 modefinal void(package private) final void(package private) final voidvoidsetTaskState(String state) voidvoidMethods inherited from class AERunnable
create, getName, run, runSupport
-
Field Details
-
RELEASE_AUTO
static final int RELEASE_AUTO- See Also:
-
RELEASE_MANUAL
static final int RELEASE_MANUAL- See Also:
-
RELEASE_MANUAL_ALLOWED
static final int RELEASE_MANUAL_ALLOWED- See Also:
-
lock
-
manualRelease
private volatile int manualRelease -
manualReleaseUnsupported
private volatile boolean manualReleaseUnsupported -
worker
-
-
Constructor Details
-
ThreadPoolTask
public ThreadPoolTask()
-
-
Method Details
-
setTaskState
-
getTaskState
-
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 -
setManualReleaseUnsupported
final void setManualReleaseUnsupported() -
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()
-