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

Jean-Noel Rouvignac
08.48.2015 a89f7014aeb71dba5c94404dfea7eb89e7eeee74
opendj-server-legacy/src/main/java/org/opends/server/extensions/TraditionalWorkQueue.java
@@ -73,13 +73,9 @@
  private static final int MAX_RETRY_COUNT = 5;
  /** The set of worker threads that will be used to process this work queue. */
  private final ArrayList<TraditionalWorkerThread> workerThreads =
    new ArrayList<TraditionalWorkerThread>();
  private final ArrayList<TraditionalWorkerThread> workerThreads = new ArrayList<>();
  /**
   * The number of operations that have been submitted to the work queue for
   * processing.
   */
  /** The number of operations that have been submitted to the work queue for processing. */
  private AtomicLong opsSubmitted;
  /**
@@ -180,13 +176,13 @@
      // Create the actual work queue.
      if (maxCapacity > 0)
      {
        opQueue = new LinkedBlockingQueue<Operation>(maxCapacity);
        opQueue = new LinkedBlockingQueue<>(maxCapacity);
      }
      else
      {
        // This will never be the case, since the configuration definition
        // ensures that the capacity is always finite.
        opQueue = new LinkedBlockingQueue<Operation>();
        opQueue = new LinkedBlockingQueue<>();
      }
      // Create the set of worker threads that should be used to service the
@@ -241,7 +237,7 @@
    // Send responses to any operations in the pending queue to indicate that
    // they won't be processed because the server is shutting down.
    CancelRequest cancelRequest = new CancelRequest(true, reason);
    ArrayList<Operation> pendingOperations = new ArrayList<Operation>();
    ArrayList<Operation> pendingOperations = new ArrayList<>();
    opQueue.removeAll(pendingOperations);
    for (Operation o : pendingOperations)
    {
@@ -710,12 +706,11 @@
        LinkedBlockingQueue<Operation> newOpQueue = null;
        if (newMaxCapacity > 0)
        {
          newOpQueue = new LinkedBlockingQueue<Operation>(
              newMaxCapacity);
          newOpQueue = new LinkedBlockingQueue<>(newMaxCapacity);
        }
        else
        {
          newOpQueue = new LinkedBlockingQueue<Operation>();
          newOpQueue = new LinkedBlockingQueue<>();
        }
        oldOpQueue = opQueue;