From 2cf4412179a4ca8610d7fbb2108040377290bf82 Mon Sep 17 00:00:00 2001
From: Jean-Noel Rouvignac <jean-noel.rouvignac@forgerock.com>
Date: Fri, 06 Jun 2014 13:12:34 +0000
Subject: [PATCH] OPENDJ-1453 (CR-3697) Change time heart beat change numbers should be synced with updates
---
opends/src/server/org/opends/server/core/ServerShutdownMonitor.java | 15 ++++++++++++---
1 files changed, 12 insertions(+), 3 deletions(-)
diff --git a/opends/src/server/org/opends/server/core/ServerShutdownMonitor.java b/opends/src/server/org/opends/server/core/ServerShutdownMonitor.java
index c7fe4f2..44b55d0 100644
--- a/opends/src/server/org/opends/server/core/ServerShutdownMonitor.java
+++ b/opends/src/server/org/opends/server/core/ServerShutdownMonitor.java
@@ -36,9 +36,18 @@
* This class defines a daemon thread that will be used to monitor the server
* shutdown process and may help nudge it along if it appears to get hung.
*/
-public class ServerShutdownMonitor extends DirectoryThread
+class ServerShutdownMonitor extends DirectoryThread
{
/**
+ * Time in milliseconds for the shutdown monitor to:
+ * <ol>
+ * <li>wait before sending interrupt to threads</li>
+ * <li>wait before final shutdown</li>
+ * </ol>
+ */
+ static final long WAIT_TIME = 30000;
+
+ /**
* Indicates whether the monitor has completed and the shutdown may be
* finalized with a call to {@link System#exit()}.
*/
@@ -110,7 +119,7 @@
// For the first milestone, we'll run for up to 30 seconds just checking
// to see whether all threads have stopped yet.
- if (waitAllThreadsDied(30000))
+ if (waitAllThreadsDied(WAIT_TIME))
{
return;
}
@@ -129,7 +138,7 @@
} catch (Exception e) {}
}
- if (waitAllThreadsDied(30000))
+ if (waitAllThreadsDied(WAIT_TIME))
{
return;
}
--
Gitblit v1.10.0