mirror of https://github.com/OpenIdentityPlatform/OpenDJ.git

neil_a_wilson
07.54.2006 f108de7fc4fddeaf70f73996fd4e9b62b2f692c0
opendj-sdk/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java
@@ -142,18 +142,7 @@
  /**
   * Initializes this work queue based on the information in the provided
   * configuration entry.
   *
   * @param  configEntry  The configuration entry that contains the information
   *                      to use to initialize this work queue.
   *
   * @throws  ConfigException  If the provided configuration entry does not have
   *                           a valid work queue configuration.
   *
   * @throws  InitializationException  If a problem occurs during initialization
   *                                   that is not related to the server
   *                                   configuration.
   * {@inheritDoc}
   */
  public void initializeWorkQueue(ConfigEntry configEntry)
         throws ConfigException, InitializationException
@@ -315,13 +304,7 @@
  /**
   * 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.
   *
   * @param  reason  The human-readable reason that the work queue is being
   *                 shut down.
   * {@inheritDoc}
   */
  public void finalizeWorkQueue(String reason)
  {
@@ -1089,5 +1072,39 @@
    return new ConfigChangeResult(ResultCode.SUCCESS, false, resultMessages);
  }
  /**
   * {@inheritDoc}
   */
  public boolean isIdle()
  {
    assert debugEnter(CLASS_NAME, "isIdle");
    if (opQueue.size() > 0)
    {
      return false;
    }
    queueLock.lock();
    try
    {
      for (TraditionalWorkerThread t : workerThreads)
      {
        if (t.isActive())
        {
          return false;
        }
      }
      return true;
    }
    finally
    {
      queueLock.unlock();
    }
  }
}