From 461b1f6784e6cf1483dc29fdcbef14ccfe6bc849 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.

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

diff --git a/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java b/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
index ffcd4bb..53d0351 100644
--- a/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
+++ b/opends/src/server/org/opends/server/extensions/SoftReferenceEntryCache.java
@@ -64,6 +64,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.*;
 
 
@@ -124,8 +125,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);
   }
 
 
@@ -1076,7 +1079,7 @@
          new IntegerWithUnitConfigAttribute(ATTR_SOFTREFCACHE_LOCK_TIMEOUT,
                                             getMessage(msgID), false, timeUnits,
                                             true, 0, false, 0, lockTimeout,
-                                            "ms");
+                                            TIME_UNIT_MILLISECONDS_FULL);
     attrList.add(lockTimeoutAttr);
 
 

--
Gitblit v1.10.0