jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1494881 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation: ChangeProcessor.java SecurableNodeStateDiff.java
Date Thu, 20 Jun 2013 07:33:43 GMT
Author: mduerig
Date: Thu Jun 20 07:33:42 2013
New Revision: 1494881

URL: http://svn.apache.org/r1494881
Log:
OAK-144 Implement Observation
- temporary solution to skip look ahead on hidden child nodes
- avoid extra instance creation

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/SecurableNodeStateDiff.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java?rev=1494881&r1=1494880&r2=1494881&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
Thu Jun 20 07:33:42 2013
@@ -296,7 +296,7 @@ class ChangeProcessor implements Runnabl
                         changes, PathUtils.concat(path, name), events, before, after, this,
name);
                 return VisibleDiff.wrap(diff);
             } else {
-                return new RecursingNodeStateDiff();
+                return RecursingNodeStateDiff.EMPTY;
             }
         }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/SecurableNodeStateDiff.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/SecurableNodeStateDiff.java?rev=1494881&r1=1494880&r2=1494881&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/SecurableNodeStateDiff.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/SecurableNodeStateDiff.java
Thu Jun 20 07:33:42 2013
@@ -22,6 +22,7 @@ package org.apache.jackrabbit.oak.plugin
 import org.apache.jackrabbit.oak.api.PropertyState;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 import org.apache.jackrabbit.oak.spi.state.NodeStateDiff;
+import org.apache.jackrabbit.oak.spi.state.NodeStateUtils;
 
 public abstract class SecurableNodeStateDiff implements NodeStateDiff {
     private final SecurableNodeStateDiff parent;
@@ -102,6 +103,11 @@ public abstract class SecurableNodeState
 
     @Override
     public boolean childNodeChanged(final String name, final NodeState before, final NodeState
after) {
+        // FIXME temporary solution to skip look ahead on hidden child nodes
+        if (NodeStateUtils.isHidden(name)) {
+            return true;
+        }
+
         final SecurableNodeStateDiff childDiff = create(this, name, before, after);
         deferred = new Deferred() {
             @Override



Mime
View raw message