| | |
| | | */ |
| | | public TraditionalWorkQueue() |
| | | { |
| | | |
| | | // No implementation should be performed here. |
| | | } |
| | | |
| | |
| | | public void initializeWorkQueue(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException |
| | | { |
| | | |
| | | |
| | | shutdownRequested = false; |
| | | killThreads = false; |
| | | opsSubmitted = new AtomicLong(0); |
| | |
| | | */ |
| | | public void finalizeWorkQueue(String reason) |
| | | { |
| | | |
| | | shutdownRequested = true; |
| | | |
| | | |
| | |
| | | */ |
| | | public boolean shutdownRequested() |
| | | { |
| | | |
| | | return shutdownRequested; |
| | | } |
| | | |
| | |
| | | public void submitOperation(Operation operation) |
| | | throws DirectoryException |
| | | { |
| | | |
| | | if (shutdownRequested) |
| | | { |
| | | int messageID = MSGID_OP_REJECTED_BY_SHUTDOWN; |
| | |
| | | */ |
| | | public Operation nextOperation(TraditionalWorkerThread workerThread) |
| | | { |
| | | |
| | | return retryNextOperation(workerThread, 0); |
| | | } |
| | | |
| | |
| | | private Operation retryNextOperation(TraditionalWorkerThread workerThread, |
| | | int numFailures) |
| | | { |
| | | |
| | | |
| | | // See if we should kill off this thread. This could be necessary if the |
| | | // number of worker threads has been decreased with the server online. If |
| | | // so, then return null and the thread will exit. |
| | |
| | | */ |
| | | public boolean removeOperation(Operation operation) |
| | | { |
| | | |
| | | return opQueue.remove(operation); |
| | | } |
| | | |
| | |
| | | */ |
| | | public long getOpsSubmitted() |
| | | { |
| | | |
| | | return opsSubmitted.longValue(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public long getOpsRejectedDueToQueueFull() |
| | | { |
| | | |
| | | return queueFullRejects.longValue(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public int size() |
| | | { |
| | | |
| | | return opQueue.size(); |
| | | } |
| | | |
| | |
| | | */ |
| | | public DN getConfigurableComponentEntryDN() |
| | | { |
| | | |
| | | return configEntryDN; |
| | | } |
| | | |
| | |
| | | */ |
| | | public List<ConfigAttribute> getConfigurationAttributes() |
| | | { |
| | | |
| | | LinkedList<ConfigAttribute> attrList = new LinkedList<ConfigAttribute>(); |
| | | |
| | | |
| | |
| | | public boolean hasAcceptableConfiguration(ConfigEntry configEntry, |
| | | List<String> unacceptableReasons) |
| | | { |
| | | |
| | | |
| | | boolean configIsAcceptable = true; |
| | | |
| | | |
| | |
| | | public ConfigChangeResult applyNewConfiguration(ConfigEntry configEntry, |
| | | boolean detailedResults) |
| | | { |
| | | |
| | | |
| | | ArrayList<String> resultMessages = new ArrayList<String>(); |
| | | int newNumThreads; |
| | | int newMaxCapacity; |
| | |
| | | */ |
| | | public boolean isIdle() |
| | | { |
| | | |
| | | if (opQueue.size() > 0) |
| | | { |
| | | return false; |