Package org.opends.server.extensions
Class TraditionalWorkQueue
java.lang.Object
org.opends.server.api.WorkQueue<TraditionalWorkQueueCfg>
org.opends.server.extensions.TraditionalWorkQueue
- All Implemented Interfaces:
Executor,ConfigurationChangeListener<TraditionalWorkQueueCfg>
public final class TraditionalWorkQueue
extends WorkQueue<TraditionalWorkQueueCfg>
implements ConfigurationChangeListener<TraditionalWorkQueueCfg>
This class defines a data structure for storing and interacting with the Directory Server work queue.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionapplyConfigurationChange(TraditionalWorkQueueCfg configuration) Applies the configuration changes to this change listener.voidSubmits a request to be processed in the server.voidfinalizeWorkQueue(LocalizableMessage reason) 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.voidinitializeWorkQueue(TraditionalWorkQueueCfg configuration, ServerContext serverContext) Initializes this work queue based on the information in the provided configuration entry.booleanisConfigurationChangeAcceptable(TraditionalWorkQueueCfg configuration, List<LocalizableMessage> unacceptableReasons) Indicates whether the proposed change to the configuration is acceptable to this change listener.booleanisIdle()Indicates whether the work queue is currently processing any requests.Methods inherited from class org.opends.server.api.WorkQueue
waitUntilIdle
-
Constructor Details
-
TraditionalWorkQueue
public TraditionalWorkQueue()Creates a new instance of this work queue.
-
-
Method Details
-
initializeWorkQueue
Description copied from class:WorkQueueInitializes this work queue based on the information in the provided configuration entry.- Specified by:
initializeWorkQueuein classWorkQueue<TraditionalWorkQueueCfg>- Parameters:
configuration- The configuration to use to initialize the work queue.serverContext- The server context.
-
finalizeWorkQueue
Description copied from class:WorkQueuePerforms 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:
finalizeWorkQueuein classWorkQueue<TraditionalWorkQueueCfg>- Parameters:
reason- The human-readable reason that the work queue is being shut down.
-
execute
Description copied from class:WorkQueueSubmits a request to be processed in the server.- Specified by:
executein interfaceExecutor- Specified by:
executein classWorkQueue<TraditionalWorkQueueCfg>- Parameters:
command- The request to be processed.
-
isConfigurationChangeAcceptable
public boolean isConfigurationChangeAcceptable(TraditionalWorkQueueCfg configuration, List<LocalizableMessage> unacceptableReasons) Description copied from interface:ConfigurationChangeListenerIndicates whether the proposed change to the configuration is acceptable to this change listener.- Specified by:
isConfigurationChangeAcceptablein interfaceConfigurationChangeListener<TraditionalWorkQueueCfg>- Parameters:
configuration- The new configuration containing the changes.unacceptableReasons- A list that can be used to hold messages about why the provided configuration is not acceptable.- Returns:
- Returns
trueif the proposed change is acceptable, orfalseif it is not.
-
applyConfigurationChange
Description copied from interface:ConfigurationChangeListenerApplies the configuration changes to this change listener.- Specified by:
applyConfigurationChangein interfaceConfigurationChangeListener<TraditionalWorkQueueCfg>- Parameters:
configuration- The new configuration containing the changes.- Returns:
- Returns information about the result of changing the configuration.
-
isIdle
public boolean isIdle()Description copied from class:WorkQueueIndicates 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:
isIdlein classWorkQueue<TraditionalWorkQueueCfg>- Returns:
trueif the work queue is currently idle, orfalseif it is being used to process one or more operations.
-