summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
diff options
context:
space:
mode:
Diffstat (limited to 'pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java')
-rw-r--r--pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java26
1 files changed, 12 insertions, 14 deletions
diff --git a/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java b/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
index 5a4dd6fb8..0f8de2ffb 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
@@ -17,28 +17,26 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.apps;
-
import java.util.Hashtable;
import com.netscape.certsrv.apps.ICommandQueue;
-
/*---------------------------------------------------------------
** CommandQueue - Class
*/
/**
- * register and unregister proccess for clean shutdown
+ * register and unregister proccess for clean shutdown
*/
public class CommandQueue implements Runnable, ICommandQueue {
- public static Hashtable mCommandQueue = new Hashtable();
+ public static Hashtable mCommandQueue = new Hashtable();
public static boolean mShuttingDown = false;
/*-----------------------------------------------------------
** CommandQueue - Constructor
*/
-
+
/**
* Main constructor.
*/
@@ -49,21 +47,21 @@ public class CommandQueue implements Runnable, ICommandQueue {
/*-----------------------------------------------------------
** run
*/
-
+
/**
* Overrides Thread.run(), calls batchPublish().
*/
public void run() {
- //int priority = Thread.MIN_PRIORITY;
- //Thread.currentThread().setPriority(priority);
+ // int priority = Thread.MIN_PRIORITY;
+ // Thread.currentThread().setPriority(priority);
/*-------------------------------------------------
** Loop until queue is empty
*/
mShuttingDown = true;
while (mCommandQueue.isEmpty() == false) {
try {
- Thread.sleep(5 * 1000);
- //gcProcess();
+ Thread.sleep(5 * 1000);
+ // gcProcess();
} catch (Exception e) {
}
@@ -75,9 +73,9 @@ public class CommandQueue implements Runnable, ICommandQueue {
if ((currentServlet instanceof com.netscape.cms.servlet.base.CMSStartServlet) == false)
mCommandQueue.put(currentRequest, currentServlet);
return true;
- }else
+ } else
return false;
-
+
}
public void unRegisterProccess(Object currentRequest, Object currentServlet) {
@@ -85,13 +83,13 @@ public class CommandQueue implements Runnable, ICommandQueue {
while (e.hasMoreElements()) {
Object thisRequest = e.nextElement();
-
+
if (thisRequest.equals(currentRequest)) {
if (mCommandQueue.get(currentRequest).equals(currentServlet))
mCommandQueue.remove(currentRequest);
}
}
-
+
}
} // CommandQueue