From 6e1f99bd7922b1f8e7136ebeb03c9b9cd2620471 Mon Sep 17 00:00:00 2001
From: matthew_swift <matthew_swift@localhost>
Date: Fri, 17 Sep 2010 22:46:18 +0000
Subject: [PATCH] Refactor configuration of maximum persistent search resource limits

---
 opendj-sdk/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java |   40 ----------------------------------------
 1 files changed, 0 insertions(+), 40 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java b/opendj-sdk/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java
index 76e50f8..c994266 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/extensions/TraditionalWorkQueue.java
@@ -113,9 +113,6 @@
   // a configuration change has not been completely applied).
   private int numWorkerThreads;
 
-  //The maximum number of concurrent persistent searches.
-  private int maxPSearches;
-
   // The queue that will be used to actually hold the pending operations.
   private LinkedBlockingQueue<AbstractOperation> opQueue;
 
@@ -155,17 +152,6 @@
 
     // Get the necessary configuration from the provided entry.
     numWorkerThreads = getNumWorkerThreads(configuration);
-    //Check the value of the maximum persistent searches attribute.
-    //We don't allow a value greater than the number of threads.
-    maxPSearches = configuration.getMaxPsearches()==null?
-      numWorkerThreads:configuration.getMaxPsearches();
-    if(maxPSearches >  numWorkerThreads)
-    {
-      Message message = ERR_CONFIG_CORE_INVALID_MAX_PSEARCH_LIMIT.get(
-              maxPSearches, numWorkerThreads, numWorkerThreads);
-      throw new ConfigException(message);
-    }
-
     maxCapacity      = configuration.getMaxWorkQueueCapacity();
 
 
@@ -565,19 +551,6 @@
                       TraditionalWorkQueueCfg configuration,
                       List<Message> unacceptableReasons)
   {
-    //Check if the max persistent search value is under limit.
-    if(configuration.getMaxPsearches() !=null)
-    {
-      int nPSearches = configuration.getMaxPsearches();
-      int nWorkerThreads = getNumWorkerThreads(configuration);
-      if(nPSearches >  nWorkerThreads)
-      {
-        Message message = ERR_CONFIG_CORE_INVALID_MAX_PSEARCH_LIMIT.get(
-                nPSearches, nWorkerThreads, nWorkerThreads);
-        unacceptableReasons.add(message);
-        return false;
-      }
-    }
     return true;
   }
 
@@ -633,10 +606,6 @@
     }
 
 
-   //Get the new maximum psearch value.
-    maxPSearches = configuration.getMaxPsearches()==null?
-      numWorkerThreads:configuration.getMaxPsearches();
-
     // Apply a change to the maximum capacity if appropriate.  Since we can't
     // change capacity on the fly, then we'll have to create a new queue and
     // transfer any remaining items into it.  Any thread that is waiting on the
@@ -738,15 +707,6 @@
   }
 
 
-  /**
-   * {@inheritDoc}
-   */
-  public int getMaxPersistentSearchLimit()
-  {
-    return maxPSearches;
-  }
-
-
 
   // Determine the number of worker threads.
   private int getNumWorkerThreads(TraditionalWorkQueueCfg configuration)

--
Gitblit v1.10.0