jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1528134 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeDispatcher.java
Date Tue, 01 Oct 2013 16:16:39 GMT
Author: mduerig
Date: Tue Oct  1 16:16:39 2013
New Revision: 1528134

URL: http://svn.apache.org/r1528134
Log:
OAK-1055: Occasional test failure in ObservationTest.observation
Remove polling for external changes

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

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeDispatcher.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeDispatcher.java?rev=1528134&r1=1528133&r2=1528134&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeDispatcher.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeDispatcher.java
Tue Oct  1 16:16:39 2013
@@ -97,25 +97,18 @@ public class ChangeDispatcher {
         internalChange(checkNotNull(after), contentSession);
     }
 
-    private void externalChange(NodeState root) {
+    private synchronized void externalChange(NodeState root) {
         if (!root.equals(previousRoot)) {
             add(ChangeSet.external(previousRoot, root));
             previousRoot = root;
         }
     }
 
-    private void internalChange(NodeState root, ContentSession contentSession) {
+    private synchronized void internalChange(NodeState root, ContentSession contentSession)
{
         add(ChangeSet.local(previousRoot, root, contentSession));
         previousRoot = root;
     }
 
-    private void externalChange() {
-        NodeState root = store.getRoot();
-        synchronized (this) {
-            externalChange(root);
-        }
-    }
-
     private void register(Listener listener) {
         synchronized (listeners) {
             listeners.add(listener);
@@ -184,9 +177,6 @@ public class ChangeDispatcher {
          */
         @CheckForNull
         public ChangeSet getChanges() {
-            if (changeSets.isEmpty()) {
-                externalChange();
-            }
             return changeSets.isEmpty() ? null : changeSets.remove();
         }
 



Mime
View raw message