From 9198167b84949aa2ea49af78ebb036e7f2d36ed6 Mon Sep 17 00:00:00 2001
From: neil_a_wilson <neil_a_wilson@localhost>
Date: Fri, 04 Aug 2006 23:17:58 +0000
Subject: [PATCH] Update the configuration and the associated code to be more consistent in the time and size units used for various purposes.  A new set of constants have been added to allow the same units to be used throughout the code, including providing both full and abbreviated unit names.

---
 opendj-sdk/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/opendj-sdk/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java b/opendj-sdk/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
index 7bdf815..964ddfc 100644
--- a/opendj-sdk/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
+++ b/opendj-sdk/opends/src/server/org/opends/server/extensions/FIFOEntryCache.java
@@ -67,6 +67,7 @@
 import static org.opends.server.loggers.Error.*;
 import static org.opends.server.messages.ExtensionsMessages.*;
 import static org.opends.server.messages.MessageHandler.*;
+import static org.opends.server.util.ServerConstants.*;
 import static org.opends.server.util.StaticUtils.*;
 
 
@@ -159,8 +160,10 @@
 
   static
   {
-    timeUnits.put("ms", 1.0);
-    timeUnits.put("s", 1000.0);
+    timeUnits.put(TIME_UNIT_MILLISECONDS_ABBR, 1D);
+    timeUnits.put(TIME_UNIT_MILLISECONDS_FULL, 1D);
+    timeUnits.put(TIME_UNIT_SECONDS_ABBR, 1000D);
+    timeUnits.put(TIME_UNIT_SECONDS_FULL, 1000D);
   }
 
 
@@ -1544,7 +1547,7 @@
          new IntegerWithUnitConfigAttribute(ATTR_FIFOCACHE_LOCK_TIMEOUT,
                                             getMessage(msgID), false, timeUnits,
                                             true, 0, false, 0, lockTimeout,
-                                            "ms");
+                                            TIME_UNIT_MILLISECONDS_FULL);
     attrList.add(lockTimeoutAttr);
 
 

--
Gitblit v1.10.0