jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1390513 - in /jackrabbit/oak/trunk/oak-core/src: main/java/org/apache/jackrabbit/oak/kernel/ main/java/org/apache/jackrabbit/oak/spi/commit/ test/java/org/apache/jackrabbit/oak/kernel/
Date Wed, 26 Sep 2012 14:26:45 GMT
Author: jukka
Date: Wed Sep 26 14:26:45 2012
New Revision: 1390513

URL: http://svn.apache.org/viewvc?rev=1390513&view=rev
Log:
OAK-344: Move NodeStore.getBuilder(NodeState) to NodeState.getBuilder()

No need to pass the NodeStore to Observer.

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/CompositeHook.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/EmptyObserver.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Observer.java
    jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreTest.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java?rev=1390513&r1=1390512&r2=1390513&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStore.java
Wed Sep 26 14:26:45 2012
@@ -112,7 +112,7 @@ public class KernelNodeStore implements 
         if (!revision.equals(root.getRevision())) {
             NodeState before = root;
             root = getRootState(revision);
-            observer.contentChanged(this, before, root);
+            observer.contentChanged(before, root);
         }
         return root;
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/CompositeHook.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/CompositeHook.java?rev=1390513&r1=1390512&r2=1390513&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/CompositeHook.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/CompositeHook.java
Wed Sep 26 14:26:45 2012
@@ -21,12 +21,10 @@ import java.util.List;
 
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
-import org.apache.jackrabbit.oak.spi.state.NodeStore;
 
 /**
  * Composite commit hook. Maintains a list of component hooks and takes
- * care of calling them in proper sequence in the
- * {@link #processCommit(NodeStore, NodeState, NodeState)} method.
+ * care of calling them in proper sequence.
  */
 public class CompositeHook implements CommitHook {
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/EmptyObserver.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/EmptyObserver.java?rev=1390513&r1=1390512&r2=1390513&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/EmptyObserver.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/EmptyObserver.java
Wed Sep 26 14:26:45 2012
@@ -17,8 +17,6 @@
 package org.apache.jackrabbit.oak.spi.commit;
 
 import org.apache.jackrabbit.oak.spi.state.NodeState;
-import org.apache.jackrabbit.oak.spi.state.NodeStore;
-
 
 /**
  * Basic content change observer that doesn't do anything. Useful as a
@@ -33,8 +31,7 @@ public class EmptyObserver implements Ob
     public static final EmptyObserver INSTANCE = new EmptyObserver();
 
     @Override
-    public void contentChanged(
-            NodeStore store, NodeState before, NodeState after) {
+    public void contentChanged(NodeState before, NodeState after) {
         // do nothing
     }
 

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Observer.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Observer.java?rev=1390513&r1=1390512&r2=1390513&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Observer.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/commit/Observer.java
Wed Sep 26 14:26:45 2012
@@ -17,12 +17,11 @@
 package org.apache.jackrabbit.oak.spi.commit;
 
 import org.apache.jackrabbit.oak.spi.state.NodeState;
-import org.apache.jackrabbit.oak.spi.state.NodeStore;
 
 /**
  * Extension point for observing changes in an Oak repository. Content
  * changes are reported by passing the "before" and "after" state of the
- * content tree to the {@link #contentChanged(NodeStore, NodeState, NodeState)}
+ * content tree to the {@link #contentChanged(NodeState, NodeState)}
  * callback method.
  * <p>
  * Each observer is guaranteed to see a linear sequence of changes, i.e.
@@ -59,10 +58,9 @@ public interface Observer {
      * the after-commit hooks should avoid any potentially blocking
      * operations.
      *
-     * @param store the node store that contains the repository content
      * @param before content tree before the changes
      * @param after content tree after the changes
      */
-    void contentChanged(NodeStore store, NodeState before, NodeState after);
+    void contentChanged(NodeState before, NodeState after);
 
 }

Modified: jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreTest.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreTest.java?rev=1390513&r1=1390512&r2=1390513&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreTest.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/test/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreTest.java
Wed Sep 26 14:26:45 2012
@@ -26,7 +26,6 @@ import org.apache.jackrabbit.oak.spi.com
 import org.apache.jackrabbit.oak.spi.commit.Observer;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
-import org.apache.jackrabbit.oak.spi.state.NodeStore;
 import org.apache.jackrabbit.oak.spi.state.NodeStoreBranch;
 import org.junit.Before;
 import org.junit.Test;
@@ -117,8 +116,7 @@ public class KernelNodeStoreTest {
         final NodeState[] states = new NodeState[2]; // { before, after }
         store.setObserver(new Observer() {
             @Override
-            public void contentChanged(
-                    NodeStore store, NodeState before, NodeState after) {
+            public void contentChanged(NodeState before, NodeState after) {
                 states[0] = before;
                 states[1] = after;
             }



Mime
View raw message