org.opends.server.core
Class WorkQueueConfigManager

java.lang.Object
  extended by org.opends.server.core.WorkQueueConfigManager
All Implemented Interfaces:
ConfigurationChangeListener<WorkQueueCfg>

public class WorkQueueConfigManager
extends java.lang.Object
implements ConfigurationChangeListener<WorkQueueCfg>

This class defines a utility that will be used to manage the Directory Server work queue.


Constructor Summary
WorkQueueConfigManager()
          Creates a new instance of this work queue config manager.
 
Method Summary
 ConfigChangeResult applyConfigurationChange(WorkQueueCfg configuration)
          Applies the configuration changes to this change listener.
 WorkQueue initializeWorkQueue()
          Initializes the Directory Server's work queue.
 boolean isConfigurationChangeAcceptable(WorkQueueCfg configuration, java.util.List<Message> unacceptableReasons)
          Indicates whether the proposed change to the configuration is acceptable to this change listener.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WorkQueueConfigManager

public WorkQueueConfigManager()
Creates a new instance of this work queue config manager.

Method Detail

initializeWorkQueue

public WorkQueue initializeWorkQueue()
                              throws ConfigException,
                                     InitializationException
Initializes the Directory Server's work queue. This should only be called at server startup.

Returns:
WorkQueue The initialized work queue that should be used by the server.
Throws:
ConfigException - If a configuration problem causes the work queue initialization process to fail.
InitializationException - If a problem occurs while initializing the work queue that is not related to the server configuration.

isConfigurationChangeAcceptable

public boolean isConfigurationChangeAcceptable(WorkQueueCfg configuration,
                                               java.util.List<Message> unacceptableReasons)
Indicates whether the proposed change to the configuration is acceptable to this change listener.

Specified by:
isConfigurationChangeAcceptable in interface ConfigurationChangeListener<WorkQueueCfg>
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 true if the proposed change is acceptable, or false if it is not.

applyConfigurationChange

public ConfigChangeResult applyConfigurationChange(WorkQueueCfg configuration)
Applies the configuration changes to this change listener.

Specified by:
applyConfigurationChange in interface ConfigurationChangeListener<WorkQueueCfg>
Parameters:
configuration - The new configuration containing the changes.
Returns:
Returns information about the result of changing the configuration.