Class TraditionalWorkerThread

  • All Implemented Interfaces:
    Runnable

    public class TraditionalWorkerThread
    extends DirectoryThread
    This class defines a data structure for storing and interacting with a Directory Server worker thread.
    • Constructor Detail

      • TraditionalWorkerThread

        public TraditionalWorkerThread​(TraditionalWorkQueue workQueue,
                                       int threadID)
        Creates a new worker thread that will service the provided work queue and process any new requests that are submitted.
        Parameters:
        workQueue - The work queue with which this worker thread is associated.
        threadID - The thread ID for this worker thread.
    • Method Detail

      • setStoppedByReducedThreadNumber

        public void setStoppedByReducedThreadNumber()
        Indicates that this thread is about to be stopped because the Directory Server configuration has been updated to reduce the number of worker threads.
      • isActive

        public boolean isActive()
        Indicates whether this worker thread is actively processing a request. Note that this is a point-in-time determination and if a reliable answer is expected then the server should impose some external constraint to ensure that no new requests are enqueued.
        Returns:
        true if this worker thread is actively processing a request, or false if it is idle.
      • run

        public void run()
        Operates in a loop, retrieving the next request from the work queue, processing it, and then going back to the queue for more.
        Specified by:
        run in interface Runnable
        Overrides:
        run in class Thread
      • shutDown

        public void shutDown()
        Indicates that the Directory Server has received a request to stop running and that this thread should stop running as soon as possible.
      • getDebugProperties

        public Map<String,​String> getDebugProperties()
        Retrieves any relevant debug information with which this tread is associated so they can be included in debug messages.
        Overrides:
        getDebugProperties in class DirectoryThread
        Returns:
        debug information about this thread as a string.