jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From resc...@apache.org
Subject svn commit: r1356328 - /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/security/authorization/acl/CachingEntryCollector.java
Date Mon, 02 Jul 2012 16:39:30 GMT
Author: reschke
Date: Mon Jul  2 16:39:30 2012
New Revision: 1356328

URL: http://svn.apache.org/viewvc?rev=1356328&view=rev
Log:
JCR-2950: for testing purposes, allow caching of nodeIds without ACEs; depends on yet another
system property

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=1356328&r1=1356327&r2=1356328&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
Mon Jul  2 16:39:30 2012
@@ -50,6 +50,7 @@ class CachingEntryCollector extends Entr
 
     private ConcurrentMap<NodeId, FutureEntries> futures = new ConcurrentHashMap<NodeId,
FutureEntries>();
     private final String strategy;
+    private final boolean cacheNoAcl;
 
     /**
      * Create a new instance.
@@ -70,6 +71,11 @@ class CachingEntryCollector extends Entr
         }
 
         log.info("Cache Update Strategy: " + strategy);
+
+        propname = "org.apache.jackrabbit.core.security.authorization.acl.CachingEntryCollector.cacheNoACL";
+        cacheNoAcl = Boolean.parseBoolean(System.getProperty(propname, "false"));
+
+        log.info("Caching entries with no ACLs: " + cacheNoAcl);
     }
 
     @Override
@@ -117,7 +123,7 @@ class CachingEntryCollector extends Entr
      */
     private Entries internalUpdateCache(NodeImpl node) throws RepositoryException {
         Entries entries = super.getEntries(node);
-        if (!entries.isEmpty()) {
+        if (cacheNoAcl || !entries.isEmpty()) {
             // adjust the 'nextId' to point to the next access controlled
             // ancestor node instead of the parent and remember the entries.
             entries.setNextId(getNextID(node));



Mime
View raw message