public class TaskThread extends DirectoryThread
DirectoryThread.FactoryThread.State, Thread.UncaughtExceptionHandlerDIRECTORY_THREAD_GROUPMAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY| Constructor and Description |
|---|
TaskThread(TaskScheduler taskScheduler,
int threadID)
Creates a new task thread with the provided information.
|
| Modifier and Type | Method and Description |
|---|---|
Map<String,String> |
getDebugProperties()
Retrieves any relevant debug information with which this tread is
associated so they can be included in debug messages.
|
Task |
getTask()
Retrieves the task currently being processed by this thread, if it is
active.
|
void |
interruptTask(TaskState interruptState,
LocalizableMessage interruptReason,
boolean exitThread)
Attempts to interrupt processing on the task in progress.
|
void |
run()
Operates in a loop, sleeping until there is no work to do, then
processing the task and returning to the scheduler for more work.
|
void |
setTask(Task task)
Provides a new task for processing by this thread.
|
getAssociatedTask, getCreationStackTrace, getParentThread, initiateShutdown, isShutdownInitiated, setAssociatedTask, startWork, stopWorkactiveCount, 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, yieldpublic TaskThread(TaskScheduler taskScheduler, int threadID)
taskScheduler - The reference to the task scheduler with which this
thread is associated.threadID - The ID assigned to this task thread.public Task getTask()
null if it is not processing any task.public void setTask(Task task)
task - The task to be processed.public void interruptTask(TaskState interruptState, LocalizableMessage interruptReason, boolean exitThread)
interruptState - The state to use for the task if it is
successfully interrupted.interruptReason - The human-readable reason that the task is to be
interrupted.exitThread - Indicates whether this thread should exit when
processing on the active task has completed.public void run()
public Map<String,String> getDebugProperties()
getDebugProperties in class DirectoryThreadCopyright © 2010-2015 ForgeRock AS. All Rights Reserved.