|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.opends.server.api.DirectoryThread
org.opends.server.backends.task.TaskThread
public class TaskThread
This class defines a thread that will be used to execute a scheduled task within the server and provide appropriate notification that the task is complete.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
java.lang.Thread.State, java.lang.Thread.UncaughtExceptionHandler |
| Field Summary |
|---|
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
TaskThread(TaskScheduler taskScheduler,
int threadID)
Creates a new task thread with the provided information. |
|
| Method Summary | |
|---|---|
java.util.Map<java.lang.String,java.lang.String> |
getDebugProperties()
Retrieves any relevent 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,
Message 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. |
| Methods inherited from class org.opends.server.api.DirectoryThread |
|---|
getAssociatedTask, getCreationStackTrace, getParentThread, setAssociatedTask |
| Methods inherited from class java.lang.Thread |
|---|
activeCount, 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, yield |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public 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.| Method Detail |
|---|
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,
Message 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()
run in interface java.lang.Runnablerun in class java.lang.Threadpublic java.util.Map<java.lang.String,java.lang.String> getDebugProperties()
getDebugProperties in class DirectoryThread
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||