jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1528601 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: kernel/ plugins/memory/ plugins/segment/ spi/state/
Date Wed, 02 Oct 2013 19:17:44 GMT
Author: mduerig
Date: Wed Oct  2 19:17:43 2013
New Revision: 1528601

URL: http://svn.apache.org/r1528601
Log:
OAK-659: Move purge logic for transient changes below the NodeBuilder interface
Remove AbstractNodeStoreBranch as it only contributes a toString method.

Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/AbstractNodeStoreBranch.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
    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/plugins/segment/SegmentNodeStoreBranch.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java?rev=1528601&r1=1528600&r2=1528601&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelNodeStoreBranch.java
Wed Oct  2 19:17:43 2013
@@ -31,17 +31,17 @@ import org.apache.jackrabbit.oak.api.Com
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.PostCommitHook;
-import org.apache.jackrabbit.oak.spi.state.AbstractNodeStoreBranch;
 import org.apache.jackrabbit.oak.spi.state.ConflictAnnotatingRebaseDiff;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.spi.state.NodeStoreBranch;
 
 /**
  * {@code NodeStoreBranch} based on {@link MicroKernel} branching and merging.
  * This implementation keeps changes in memory up to a certain limit and writes
  * them back to the Microkernel branch when the limit is exceeded.
  */
-class KernelNodeStoreBranch extends AbstractNodeStoreBranch {
+class KernelNodeStoreBranch implements NodeStoreBranch {
 
     /** The underlying store to which this branch belongs */
     private final KernelNodeStore store;

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=1528601&r1=1528600&r2=1528601&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
Wed Oct  2 19:17:43 2013
@@ -34,7 +34,6 @@ import com.google.common.io.ByteStreams;
 import org.apache.jackrabbit.oak.api.CommitFailedException;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.PostCommitHook;
-import org.apache.jackrabbit.oak.spi.state.AbstractNodeStoreBranch;
 import org.apache.jackrabbit.oak.spi.state.ConflictAnnotatingRebaseDiff;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
@@ -164,7 +163,7 @@ public class MemoryNodeStore implements 
 
     //------------------------------------------------------------< private >---
 
-    private static class MemoryNodeStoreBranch extends AbstractNodeStoreBranch {
+    private static class MemoryNodeStoreBranch implements NodeStoreBranch {
 
         /** The underlying store to which this branch belongs */
         private final MemoryNodeStore store;
@@ -227,6 +226,14 @@ public class MemoryNodeStore implements 
             throw new UnsupportedOperationException();
         }
 
+        //------------------------------------------------------------< Object >---
+
+        @Override
+        public String toString() {
+            return root.toString();
+        }
+
+
         // ----------------------------------------------------< private >---
 
         private void checkNotMerged() {

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreBranch.java?rev=1528601&r1=1528600&r2=1528601&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreBranch.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/segment/SegmentNodeStoreBranch.java
Wed Oct  2 19:17:43 2013
@@ -29,12 +29,12 @@ import org.apache.jackrabbit.oak.api.Com
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.spi.commit.CommitHook;
 import org.apache.jackrabbit.oak.spi.commit.PostCommitHook;
-import org.apache.jackrabbit.oak.spi.state.AbstractNodeStoreBranch;
 import org.apache.jackrabbit.oak.spi.state.ConflictAnnotatingRebaseDiff;
 import org.apache.jackrabbit.oak.spi.state.NodeBuilder;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
+import org.apache.jackrabbit.oak.spi.state.NodeStoreBranch;
 
-class SegmentNodeStoreBranch extends AbstractNodeStoreBranch {
+class SegmentNodeStoreBranch implements NodeStoreBranch {
 
     private static final Random RANDOM = new Random();
 
@@ -286,4 +286,8 @@ class SegmentNodeStoreBranch extends Abs
         return true;
     }
 
+    @Override
+    public String toString() {
+        return getHead().toString();
+    }
 }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java?rev=1528601&r1=1528600&r2=1528601&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/spi/state/NodeStoreBranch.java
Wed Oct  2 19:17:43 2013
@@ -32,7 +32,7 @@ public interface NodeStoreBranch {
     /**
      * Returns the base state of this branch.
      * The base state is the state of the tree as it was at the time
-     * {@link NodeStore#branch()} was used to obtain this instance.
+     * this branch was created.
      *
      * @return root node state
      */



Mime
View raw message