@PublicAPI(stability=VOLATILE, mayInstantiate=true, mayExtend=true, mayInvoke=true) public class DirectoryThread extends Thread
Thread.State, Thread.UncaughtExceptionHandler
Modifier and Type | Field and Description |
---|---|
static org.opends.server.api.DirectoryThread.DirectoryThreadGroup |
DIRECTORY_THREAD_GROUP
The directory thread group that all directory threads will be a member of.
|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
Modifier | Constructor and Description |
---|---|
|
DirectoryThread(Runnable target,
String threadName)
Creates a new instance of this directory thread with the specified name and with the specified target as its run
object.
|
protected |
DirectoryThread(String threadName)
Creates a new instance of this directory thread with the specified name.
|
Modifier and Type | Method and Description |
---|---|
Task |
getAssociatedTask()
Retrieves the task with which this thread is associated.
|
StackTraceElement[] |
getCreationStackTrace()
Retrieves the stack trace that was captured at the time that this thread was created.
|
Map<String,String> |
getDebugProperties()
Retrieves any relevant debug information with which this tread is associated so they can be included in debug
messages.
|
Thread |
getParentThread()
Retrieves a reference to the parent thread that created this directory thread.
|
void |
initiateShutdown()
Instructs the current thread to initiate the shutdown process.
|
boolean |
isShutdownInitiated()
Returns whether the shutdown process has been initiated on the current thread.
|
boolean |
isStarted()
Returns
true if this thread has been started. |
boolean |
isStarting()
Returns
true if this thread is waiting to be started. |
protected void |
setAssociatedTask(Task task)
Sets the task with which this thread is associated.
|
void |
setStarted()
Sets the current thread state to "started" if the shutdown process was not initiated.
|
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, run, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
public static final org.opends.server.api.DirectoryThread.DirectoryThreadGroup DIRECTORY_THREAD_GROUP
public DirectoryThread(Runnable target, String threadName)
target
- The target runnable object.threadName
- The human-readable name to use for this thread for debugging purposes.protected DirectoryThread(String threadName)
threadName
- The human-readable name to use for this thread for debugging purposes.public StackTraceElement[] getCreationStackTrace()
public Thread getParentThread()
public Task getAssociatedTask()
null
if there is none.protected void setAssociatedTask(Task task)
null
to indicate that it is not associated
with any task.task
- The task with which this thread is associated.public Map<String,String> getDebugProperties()
public boolean isStarting()
true
if this thread is waiting to be started.true
if this thread is waiting to be started.public boolean isStarted()
true
if this thread has been started.true
if this thread has been started.public boolean isShutdownInitiated()
Waiting for the thread to terminate should be done by invoking one of the Thread.join()
methods.
public void initiateShutdown()
Thread.run()
method.public void setStarted()
Copyright 2010-2022 ForgeRock AS.