Class TraditionalWorkQueue

    • Constructor Detail

      • TraditionalWorkQueue

        public TraditionalWorkQueue()
        Creates a new instance of this work queue.
    • Method Detail

      • finalizeWorkQueue

        public void finalizeWorkQueue​(LocalizableMessage reason)
        Description copied from class: WorkQueue
        Performs any necessary finalization for this work queue, including ensuring that all active operations are interrupted or will be allowed to complete, and that all pending operations will be cancelled.
        Specified by:
        finalizeWorkQueue in class WorkQueue<TraditionalWorkQueueCfg>
        Parameters:
        reason - The human-readable reason that the work queue is being shut down.
      • submitOperation

        public void submitOperation​(Operation operation)
                             throws LdapException
        Submits an operation to be processed by one of the worker threads associated with this work queue.
        Specified by:
        submitOperation in class WorkQueue<TraditionalWorkQueueCfg>
        Parameters:
        operation - The operation to be processed.
        Throws:
        LdapException - If the provided operation is not accepted for some reason (e.g., if the server is shutting down or the pending operation queue is already at its maximum capacity).
      • trySubmitOperation

        public boolean trySubmitOperation​(Operation operation)
                                   throws LdapException
        Description copied from class: WorkQueue
        Tries to submit an operation to be processed in the server, without blocking.
        Specified by:
        trySubmitOperation in class WorkQueue<TraditionalWorkQueueCfg>
        Parameters:
        operation - The operation to be processed.
        Returns:
        true if the operation could be submitted to the queue, false if the queue was full
        Throws:
        LdapException - If the provided operation is not accepted for some reason (e.g., if the server is shutting down).
      • isIdle

        public boolean isIdle()
        Description copied from class: WorkQueue
        Indicates whether the work queue is currently processing any requests. Note that this is a point-in-time determination, and if any component of the server wishes to depend on a quiescent state then it should use some external mechanism to ensure that no other requests are submitted to the queue.
        Specified by:
        isIdle in class WorkQueue<TraditionalWorkQueueCfg>
        Returns:
        true if the work queue is currently idle, or false if it is being used to process one or more operations.
      • getNumWorkerThreads

        public int getNumWorkerThreads()
        Return the number of worker threads used by this WorkQueue.
        Specified by:
        getNumWorkerThreads in class WorkQueue<TraditionalWorkQueueCfg>
        Returns:
        the number of worker threads used by this WorkQueue