jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1298436 - in /jackrabbit/branches/2.4: ./ jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
Date Thu, 08 Mar 2012 15:43:27 GMT
Author: reschke
Date: Thu Mar  8 15:43:27 2012
New Revision: 1298436

URL: http://svn.apache.org/viewvc?rev=1298436&view=rev
Log:
JCR-3254: make max size of CachingEntryCollector's cache configurable (backported to 2.4)

Modified:
    jackrabbit/branches/2.4/   (props changed)
    jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java

Propchange: jackrabbit/branches/2.4/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Mar  8 15:43:27 2012
@@ -1,3 +1,3 @@
 /jackrabbit/branches/JCR-2272:1173165-1176545
 /jackrabbit/sandbox/JCR-2415-lucene-3.0:1060860-1064038
-/jackrabbit/trunk:1221447,1221579,1221593,1221789,1221818,1225179,1225191,1225196,1225207,1225525,1225528,1226452,1226472,1226515,1226750,1226863,1227171,1227240,1227590,1227593,1227615,1228058,1228149,1228155,1228160,1230507,1230681,1230688,1231204,1232035,1232100,1232404,1232831,1232920,1232922,1233069,1233344,1233446,1233468,1233471,1234807,1235192,1235375,1235423,1236709,1236775,1236819-1236821,1240053,1245443,1291424,1297526
+/jackrabbit/trunk:1221447,1221579,1221593,1221789,1221818,1225179,1225191,1225196,1225207,1225525,1225528,1226452,1226472,1226515,1226750,1226863,1227171,1227240,1227590,1227593,1227615,1228058,1228149,1228155,1228160,1230507,1230681,1230688,1231204,1232035,1232100,1232404,1232831,1232920,1232922,1233069,1233344,1233446,1233468,1233471,1234807,1235192,1235375,1235423,1236709,1236775,1236819-1236821,1240053,1245443,1291424,1297526,1298428

Modified: jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java?rev=1298436&r1=1298435&r2=1298436&view=diff
==============================================================================
--- jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
(original)
+++ jackrabbit/branches/2.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
Thu Mar  8 15:43:27 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