summaryrefslogtreecommitdiffstats
path: root/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
diff options
context:
space:
mode:
authorAde Lee <alee@redhat.com>2012-01-11 12:57:53 -0500
committerAde Lee <alee@redhat.com>2012-01-11 13:49:04 -0500
commit10cfe7756e967ac91c66d33b392aeab9cf3780fb (patch)
treed5ac9b58442265d2ce5ef60e31f041ddacba1b4f /pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
parentedcb24f65cc3700e75d0a1d14dc2483f210b0ee4 (diff)
downloadpki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.gz
pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.tar.xz
pki-10cfe7756e967ac91c66d33b392aeab9cf3780fb.zip
Formatting (no line wrap in comments or code)
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.java20
1 files changed, 9 insertions, 11 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 41b31049f..c4b14dc10 100644
--- a/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
+++ b/pki/base/common/src/com/netscape/cmscore/apps/CommandQueue.java
@@ -17,7 +17,6 @@
// --- END COPYRIGHT BLOCK ---
package com.netscape.cmscore.apps;
-
import java.util.Hashtable;
import javax.servlet.Servlet;
@@ -25,23 +24,22 @@ import javax.servlet.Servlet;
import com.netscape.certsrv.apps.ICommandQueue;
import com.netscape.cms.servlet.common.CMSRequest;
-
/*---------------------------------------------------------------
** 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<CMSRequest, Servlet> mCommandQueue = new Hashtable<CMSRequest, Servlet>();
+ public static Hashtable<CMSRequest, Servlet> mCommandQueue = new Hashtable<CMSRequest, Servlet>();
public static boolean mShuttingDown = false;
/*-----------------------------------------------------------
** CommandQueue - Constructor
*/
-
+
/**
* Main constructor.
*/
@@ -52,7 +50,7 @@ public class CommandQueue implements Runnable, ICommandQueue {
/*-----------------------------------------------------------
** run
*/
-
+
/**
* Overrides Thread.run(), calls batchPublish().
*/
@@ -65,7 +63,7 @@ public class CommandQueue implements Runnable, ICommandQueue {
mShuttingDown = true;
while (mCommandQueue.isEmpty() == false) {
try {
- Thread.sleep(5 * 1000);
+ Thread.sleep(5 * 1000);
//gcProcess();
} catch (Exception e) {
@@ -78,9 +76,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) {
@@ -88,13 +86,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