|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opends.server.api.WorkQueue<TraditionalWorkQueueCfg>
org.opends.server.extensions.TraditionalWorkQueue
public class TraditionalWorkQueue
This class defines a data structure for storing and interacting with the Directory Server work queue.
Constructor Summary | |
---|---|
TraditionalWorkQueue()
Creates a new instance of this work queue. |
Method Summary | |
---|---|
ConfigChangeResult |
applyConfigurationChange(TraditionalWorkQueueCfg configuration)
Applies the configuration changes to this change listener. |
void |
finalizeWorkQueue(Message 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. |
long |
getOpsRejectedDueToQueueFull()
Retrieves the total number of operations that have been rejected because the work queue was already at its maximum capacity. |
long |
getOpsSubmitted()
Retrieves the total number of operations that have been successfully submitted to this work queue for processing since server startup. |
void |
initializeWorkQueue(TraditionalWorkQueueCfg configuration)
Initializes this work queue based on the information in the provided configuration entry. |
boolean |
isConfigurationChangeAcceptable(TraditionalWorkQueueCfg configuration,
java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener. |
boolean |
isIdle()
Indicates whether the work queue is currently processing any requests. |
AbstractOperation |
nextOperation(TraditionalWorkerThread workerThread)
Retrieves the next operation that should be processed by one of the worker threads, blocking if necessary until a new request arrives. |
boolean |
removeOperation(AbstractOperation operation)
Attempts to remove the specified operation from this queue if it has not yet been picked up for processing by one of the worker threads. |
boolean |
shutdownRequested()
Indicates whether this work queue has received a request to shut down. |
int |
size()
Retrieves the number of pending operations in the queue that have not yet been picked up for processing. |
void |
submitOperation(AbstractOperation operation)
Submits an operation to be processed by one of the worker threads associated with this work queue. |
Methods inherited from class org.opends.server.api.WorkQueue |
---|
waitUntilIdle |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TraditionalWorkQueue()
initializeWorkQueue
method.
Method Detail |
---|
public void initializeWorkQueue(TraditionalWorkQueueCfg configuration) throws ConfigException, InitializationException
initializeWorkQueue
in class WorkQueue<TraditionalWorkQueueCfg>
configuration
- The configuration to use to initialize
the work queue.
ConfigException
- If the provided configuration entry
does not have a valid work queue
configuration.
InitializationException
- If a problem occurs during
initialization that is not
related to the server
configuration.public void finalizeWorkQueue(Message reason)
finalizeWorkQueue
in class WorkQueue<TraditionalWorkQueueCfg>
reason
- The human-readable reason that the work queue is
being shut down.public boolean shutdownRequested()
true
if the work queue has recieved a request to shut
down, or false
if not.public void submitOperation(AbstractOperation operation) throws DirectoryException
submitOperation
in class WorkQueue<TraditionalWorkQueueCfg>
operation
- The operation to be processed.
DirectoryException
- 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).public AbstractOperation nextOperation(TraditionalWorkerThread workerThread)
workerThread
- The worker thread that is requesting the operation.
null
if the server is shutting down and no more operations will be
processed.public boolean removeOperation(AbstractOperation operation)
operation
- The operation to remove from the queue.
true
if the provided request was present in the queue
and was removed successfully, or false
it not.public long getOpsSubmitted()
public long getOpsRejectedDueToQueueFull()
public int size()
public boolean isConfigurationChangeAcceptable(TraditionalWorkQueueCfg configuration, java.util.List<Message> unacceptableReasons)
isConfigurationChangeAcceptable
in interface ConfigurationChangeListener<TraditionalWorkQueueCfg>
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.
true
if the proposed change is
acceptable, or false
if it is not.public ConfigChangeResult applyConfigurationChange(TraditionalWorkQueueCfg configuration)
applyConfigurationChange
in interface ConfigurationChangeListener<TraditionalWorkQueueCfg>
configuration
- The new configuration containing the changes.
public boolean isIdle()
isIdle
in class WorkQueue<TraditionalWorkQueueCfg>
true
if the work queue is currently idle, or
false
if it is being used to process one or more
operations.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |