jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1365574 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak: kernel/KernelRootStateBuilder.java plugins/memory/MemoryNodeStateBuilder.java
Date Wed, 25 Jul 2012 13:39:29 GMT
Author: jukka
Date: Wed Jul 25 13:39:29 2012
New Revision: 1365574

URL: http://svn.apache.org/viewvc?rev=1365574&view=rev
Log:
OAK-167: Caching NodeStore implementation

Allow KernelNodeStateBuilder to directly commit changes to a branch in the MicroKernel

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRootStateBuilder.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRootStateBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRootStateBuilder.java?rev=1365574&r1=1365573&r2=1365574&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRootStateBuilder.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/kernel/KernelRootStateBuilder.java
Wed Jul 25 13:39:29 2012
@@ -55,7 +55,10 @@ class KernelRootStateBuilder extends Mem
             if (branchRevision == null) {
                 branchRevision = kernel.branch(baseRevision);
             }
-
+            JsopDiff diff = new JsopDiff();
+            getNodeState().compareAgainstBaseState(getBaseState(), diff);
+            branchRevision = kernel.commit(
+                    "/", diff.toString(), branchRevision, null);
             updates = 0;
         }
     }

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java?rev=1365574&r1=1365573&r2=1365574&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/memory/MemoryNodeStateBuilder.java
Wed Jul 25 13:39:29 2012
@@ -164,6 +164,10 @@ public class MemoryNodeStateBuilder impl
         // do nothing
     }
 
+    protected NodeState getBaseState() {
+        return base;
+    }
+
     @Override
     public NodeState getNodeState() {
         connect(false);



Mime
View raw message