You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-commits@jackrabbit.apache.org by ju...@apache.org on 2012/07/09 12:48:58 UTC

svn commit: r1359048 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: plugins/memory/MemoryNodeStore.java spi/state/AbstractNodeStore.java spi/state/NodeStateDiff.java spi/state/NodeStore.java

Author: jukka
Date: Mon Jul  9 10:48:58 2012
New Revision: 1359048

URL: http://svn.apache.org/viewvc?rev=1359048&view=rev
Log:
OAK-171: Add NodeState.compareAgainstBaseState()

Remove NodeStore.compare() in favor of the new method

Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/AbstractNodeStore.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateDiff.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java?rev=1359048&r1=1359047&r2=1359048&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStore.java Mon Jul  9 10:48:58 2012
@@ -16,15 +16,15 @@
  */
 package org.apache.jackrabbit.oak.plugins.memory;
 
-import org.apache.jackrabbit.oak.spi.state.AbstractNodeStore;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 import org.apache.jackrabbit.oak.spi.state.NodeStateBuilder;
+import org.apache.jackrabbit.oak.spi.state.NodeStore;
 
 /**
  * Abstract node store base class with in-memory node state builder
  * functionality.
  */
-public abstract class MemoryNodeStore extends AbstractNodeStore {
+public abstract class MemoryNodeStore implements NodeStore {
 
     @Override
     public NodeStateBuilder getBuilder(NodeState base) {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateDiff.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateDiff.java?rev=1359048&r1=1359047&r2=1359048&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateDiff.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStateDiff.java Mon Jul  9 10:48:58 2012
@@ -19,16 +19,18 @@ package org.apache.jackrabbit.oak.spi.st
 import org.apache.jackrabbit.oak.api.PropertyState;
 
 /**
- * Handler of node state differences.
- * The {@link NodeStore#compare(NodeState, NodeState, NodeStateDiff)} reports
- * detected node state differences by calling methods of a handler instance
- * that implements this interface. The compare method will go through all
- * properties and child nodes of the two states, calling the relevant
- * added, changed or deleted methods where appropriate. Differences in
- * the ordering of properties or child nodes do not affect the comparison,
- * and the order in which such differences are reported is unspecified.
+ * Handler of node state differences. The
+ * {@link NodeState#compareAgainstBaseState(NodeState, NodeStateDiff)}
+ * method reports detected node state differences by calling methods of
+ * a handler instance that implements this interface. The compare method
+ * will go through all properties and child nodes of the two states,
+ * calling the relevant added, changed or deleted methods where appropriate.
+ * Differences in the ordering of properties or child nodes do not affect
+ * the comparison, and the order in which such differences are reported
+ * is unspecified.
  * <p>
- * Note that the {@link NodeStore#compare(NodeState, NodeState, NodeStateDiff)}
+ * Note that the
+ * {@link NodeState#compareAgainstBaseState(NodeState, NodeStateDiff)}
  * method only compares the given states without recursing to the subtrees
  * below. An implementation of this interface should recursively call that
  * method for the relevant child node entries to find out all the changes

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java?rev=1359048&r1=1359047&r2=1359048&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java (original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStore.java Mon Jul  9 10:48:58 2012
@@ -65,15 +65,4 @@ public interface NodeStore {
     @Nonnull
     CoreValueFactory getValueFactory();
 
-    /**
-     * Compares the given two node states. Any found differences are
-     * reported by calling the relevant added, changed or deleted methods
-     * of the given handler.
-     *
-     * @param before node state before changes
-     * @param after node state after changes
-     * @param diff handler of node state differences
-     */
-    void compare(NodeState before, NodeState after, NodeStateDiff diff);
-
 }