jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1298428 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
Date Thu, 08 Mar 2012 15:23:46 GMT
Author: reschke
Date: Thu Mar  8 15:23:46 2012
New Revision: 1298428

URL: http://svn.apache.org/viewvc?rev=1298428&view=rev
Log:
JCR-3254: make max size of CachingEntryCollector's cache configurable

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java?rev=1298428&r1=1298427&r2=1298428&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
Thu Mar  8 15:23:46 2012
@@ -57,7 +57,19 @@ class CachingEntryCollector extends Entr
     CachingEntryCollector(SessionImpl systemSession, NodeId rootID) throws RepositoryException
{
         super(systemSession, rootID);
 
-        cache = new GrowingLRUMap(1024, 5000);
+        int maxsize = 5000;
+        String propname = "org.apache.jackrabbit.core.security.authorization.acl.CachingEntryCollector.maxsize";
+        try {
+            maxsize = Integer.parseInt(System.getProperty(propname,
+                    Integer.toString(maxsize)));
+        } catch (NumberFormatException ex) {
+            log.error("Parsing system property " + propname + " with value: "
+                    + System.getProperty(propname), ex);
+        }
+
+        log.info("Creating cache with max size of: " + maxsize);
+
+        cache = new GrowingLRUMap(1024, maxsize);
     }
 
     @Override



Mime
View raw message