From 100e551066fc2b42a7578906a0a7a734896a2961 Mon Sep 17 00:00:00 2001
From: abobrov <abobrov@localhost>
Date: Tue, 08 Jan 2008 10:13:19 +0000
Subject: [PATCH] - [Issue 1595] need a fast way to prime the FileSystemEntryCache:   Add generic entry cache pre-load mechanism which is backend and entry cache implementations independent.

---
 opends/src/server/org/opends/server/core/EntryCacheConfigManager.java |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
index c803931..21ce273 100644
--- a/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
+++ b/opends/src/server/org/opends/server/core/EntryCacheConfigManager.java
@@ -22,7 +22,7 @@
  * CDDL HEADER END
  *
  *
- *      Portions Copyright 2006-2007 Sun Microsystems, Inc.
+ *      Portions Copyright 2006-2008 Sun Microsystems, Inc.
  */
 package org.opends.server.core;
 import org.opends.messages.Message;
@@ -57,6 +57,7 @@
 import org.opends.server.config.ConfigConstants;
 import org.opends.server.config.ConfigEntry;
 import org.opends.server.extensions.DefaultEntryCache;
+import org.opends.server.extensions.EntryCachePreloader;
 import org.opends.server.monitors.EntryCacheMonitorProvider;
 import org.opends.server.types.DN;
 
@@ -225,6 +226,13 @@
         }
       }
     }
+
+    // If requested preload the entry cache.
+    if (rootConfiguration.getDefaultEntryCache().isCachePreload()) {
+      // Kick off preload arbiter main thread.
+      EntryCachePreloader preloadThread = new EntryCachePreloader();
+      preloadThread.start();
+    }
   }
 
 

--
Gitblit v1.10.0