directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kayyag...@apache.org
Subject svn commit: r991864 - /directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DNFactory.java
Date Thu, 02 Sep 2010 09:02:50 GMT
Author: kayyagari
Date: Thu Sep  2 09:02:49 2010
New Revision: 991864

URL: http://svn.apache.org/viewvc?rev=991864&view=rev
Log:
o added method to clear DN cache

Modified:
    directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DNFactory.java

Modified: directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DNFactory.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DNFactory.java?rev=991864&r1=991863&r2=991864&view=diff
==============================================================================
--- directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DNFactory.java
(original)
+++ directory/apacheds/trunk/core/src/main/java/org/apache/directory/server/core/DNFactory.java
Thu Sep  2 09:02:49 2010
@@ -188,4 +188,17 @@ public class DNFactory
         schemaManager = dirService.getSchemaManager();
         DN_CACHE = dirService.getCacheService().getCache( "dnCache" );
     }
+    
+    
+    /**
+     * clears all the DNs present in the cache 
+     */
+    public static void clearCache()
+    {
+        if( DN_CACHE != null )
+        {
+            LOG.debug( "clearing all the DNs from cache" );
+            DN_CACHE.removeAll();
+        }
+    }
 }



Mime
View raw message