jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ste...@apache.org
Subject svn commit: r1240770 - in /jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk: model/ store/
Date Sun, 05 Feb 2012 17:56:37 GMT
Author: stefan
Date: Sun Feb  5 17:56:37 2012
New Revision: 1240770

URL: http://svn.apache.org/viewvc?rev=1240770&view=rev
Log:
flat hierarchy support (WIP)

Modified:
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntries.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesBucket.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesInlined.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesTree.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableNode.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/StoredNode.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/AbstractPersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/BDbPersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/FSPersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/H2PersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/InMemPersistenceManager.java
    jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/MongoPersistenceManager.java

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/AbstractNode.java
Sun Feb  5 17:56:37 2012
@@ -36,30 +36,31 @@ import java.util.Set;
  */
 public abstract class AbstractNode implements Node {
 
+    protected RevisionProvider provider;
+    
     protected HashMap<String, String> properties;
 
     protected ChildNodeEntries childEntries;
 
-    protected AbstractNode() {
+    protected AbstractNode(RevisionProvider provider) {
+        this.provider = provider;
         this.properties = new HashMap<String, String>();
         this.childEntries = new ChildNodeEntriesInlined();
     }
 
-    protected AbstractNode(Node other) {
+    protected AbstractNode(Node other, RevisionProvider provider) {
+        this.provider = provider;
         if (other instanceof AbstractNode) {
             AbstractNode srcNode = (AbstractNode) other;
             this.properties = (HashMap<String, String>) srcNode.properties.clone();
             this.childEntries = (ChildNodeEntries) srcNode.childEntries.clone();
         } else {
             this.properties = new HashMap<String, String>(other.getProperties());
-            this.childEntries = new ChildNodeEntriesInlined();
-/*
             if (other.getChildNodeCount() <= ChildNodeEntries.CAPACITY_THRESHOLD) {
                 this.childEntries = new ChildNodeEntriesInlined();
             } else {
                 this.childEntries = new ChildNodeEntriesTree(provider);
             }
-*/
             for (Iterator<ChildNodeEntry> it = other.getChildNodeEntries(0, -1); it.hasNext();
) {
                 ChildNodeEntry cne = it.next();
                 this.childEntries.add(cne);
@@ -217,13 +218,7 @@ public abstract class AbstractNode imple
                         return new Binding.KeyValuePair(key, properties.get(key));
                     }
                 });
-        binding.write(":children", childEntries.getCount(),
-                new AbstractRangeIterator<Binding.KeyValuePair>(childEntries.getEntries(0,
-1), 0, -1) {
-                    @Override
-                    protected Binding.KeyValuePair doNext() {
-                        ChildNodeEntry cne = (ChildNodeEntry) it.next();
-                        return new Binding.KeyValuePair(cne.getName(), cne.getId());
-                    }
-                });
+        binding.write(":inlined", childEntries.inlined() ? 1 : 0);
+        childEntries.serialize(binding);
     }
-}
+}
\ No newline at end of file

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntries.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntries.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntries.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntries.java
Sun Feb  5 17:56:37 2012
@@ -16,6 +16,8 @@
  */
 package org.apache.jackrabbit.mk.model;
 
+import org.apache.jackrabbit.mk.store.Binding;
+
 import java.util.Iterator;
 
 /**
@@ -79,4 +81,8 @@ public interface ChildNodeEntries extend
      * @return
      */
     Iterator<ChildNodeEntry> getModified(final ChildNodeEntries other);
+
+    //------------------------------------------------< serialization support >
+
+    void serialize(Binding binding) throws Exception;
 }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesBucket.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesBucket.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesBucket.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesBucket.java
Sun Feb  5 17:56:37 2012
@@ -23,21 +23,10 @@ import java.util.HashMap;
 import java.util.Iterator;
 
 /**
- *
+ * todo consolidate ChildNodeEntriesBucket and ChildNodeEntriesInlined -> ChildNodeEntriesBucket(insertionOrdered)
  */
 public class ChildNodeEntriesBucket extends ChildNodeEntriesInlined {
 
-    public static ChildNodeEntriesBucket deserialize(String id, Binding binding) throws Exception
{
-        ChildNodeEntriesBucket newInstance = new ChildNodeEntriesBucket();
-
-        Iterator<Binding.KeyValuePair> iter = binding.read(":children");
-        while (iter.hasNext()) {
-            Binding.KeyValuePair kvp = iter.next();
-            newInstance.add(new ChildNodeEntry(kvp.getKey(), kvp.getValue()));
-        }
-        return newInstance;
-    }
-
     public ChildNodeEntriesBucket() {
         // using stock HashMap since keeping insertion-order is not required
         entries = new HashMap<String, ChildNodeEntry>();
@@ -66,6 +55,17 @@ public class ChildNodeEntriesBucket exte
 
     //------------------------------------------------< serialization support >
 
+    public static ChildNodeEntriesBucket deserialize(String id, Binding binding) throws Exception
{
+        ChildNodeEntriesBucket newInstance = new ChildNodeEntriesBucket();
+
+        Iterator<Binding.KeyValuePair> iter = binding.read(":children");
+        while (iter.hasNext()) {
+            Binding.KeyValuePair kvp = iter.next();
+            newInstance.add(new ChildNodeEntry(kvp.getKey(), kvp.getValue()));
+        }
+        return newInstance;
+    }
+
     public void serialize(Binding binding) throws Exception {
         binding.write(":children", getCount(),
                 new AbstractRangeIterator<Binding.KeyValuePair>(getEntries(0, -1),
0, -1) {

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesInlined.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesInlined.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesInlined.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesInlined.java
Sun Feb  5 17:56:37 2012
@@ -16,7 +16,10 @@
  */
 package org.apache.jackrabbit.mk.model;
 
+import org.apache.jackrabbit.mk.store.Binding;
+import org.apache.jackrabbit.mk.store.RevisionProvider;
 import org.apache.jackrabbit.mk.util.AbstractFilteringIterator;
+import org.apache.jackrabbit.mk.util.AbstractRangeIterator;
 import org.apache.jackrabbit.mk.util.EmptyIterator;
 import org.apache.jackrabbit.mk.util.RangeIterator;
 
@@ -26,7 +29,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 
 /**
- *
+ * todo consolidate ChildNodeEntriesBucket and ChildNodeEntriesInlined -> ChildNodeEntriesBucket(insertionOrdered)
  */
 public class ChildNodeEntriesInlined implements ChildNodeEntries {
 
@@ -242,4 +245,28 @@ public class ChildNodeEntriesInlined imp
             }
         };
     }
+
+    //------------------------------------------------< serialization support >
+
+    @Override
+    public void serialize(Binding binding) throws Exception {
+        binding.write(":children", getCount(),
+                new AbstractRangeIterator<Binding.KeyValuePair>(getEntries(0, -1),
0, -1) {
+                    @Override
+                    protected Binding.KeyValuePair doNext() {
+                        ChildNodeEntry cne = (ChildNodeEntry) it.next();
+                        return new Binding.KeyValuePair(cne.getName(), cne.getId());
+                    }
+                });
+    }
+
+    static ChildNodeEntriesInlined deserialize(RevisionProvider provider, Binding binding)
throws Exception {
+        ChildNodeEntriesInlined newInstance = new ChildNodeEntriesInlined();
+        Iterator<Binding.KeyValuePair> iter = binding.read(":children");
+        while (iter.hasNext()) {
+            Binding.KeyValuePair kvp = iter.next();
+            newInstance.add(new ChildNodeEntry(kvp.getKey(), kvp.getValue()));
+        }
+        return newInstance;
+    }
 }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesTree.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesTree.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesTree.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/ChildNodeEntriesTree.java
Sun Feb  5 17:56:37 2012
@@ -16,6 +16,7 @@
  */
 package org.apache.jackrabbit.mk.model;
 
+import org.apache.jackrabbit.mk.store.Binding;
 import org.apache.jackrabbit.mk.store.RevisionProvider;
 import org.apache.jackrabbit.mk.store.RevisionStore;
 import org.apache.jackrabbit.mk.util.AbstractFilteringIterator;
@@ -26,6 +27,7 @@ import java.util.ArrayList;
 import java.util.Arrays;
 import java.util.Iterator;
 import java.util.List;
+import java.util.NoSuchElementException;
 
 /**
  *
@@ -545,6 +547,70 @@ public class ChildNodeEntriesTree implem
         }
     }
 
+    //------------------------------------------------< serialization support >
+
+    public void serialize(Binding binding) throws Exception {
+        binding.write(":count", count);
+        binding.write(":index", index.length, new Iterator<Binding.KeyValuePair>()
{
+            int pos = -1;
+            
+            @Override
+            public boolean hasNext() {
+                return pos < index.length - 1;
+            }
+
+            @Override
+            public Binding.KeyValuePair next() {
+                pos++;
+                if (pos >= index.length) {
+                    throw new NoSuchElementException();
+                }
+                // serialize index array entry
+                IndexEntry entry = index[pos];
+                if (entry == null) {
+                    // null entry
+                    return new Binding.KeyValuePair(Integer.toString(pos), ""); 
+                } else if (entry instanceof NodeInfo) {
+                    NodeInfo ni = (NodeInfo) entry;
+                    return new Binding.KeyValuePair(Integer.toString(pos), "n" + ni.getId()
+ ":" + ni.getName());
+                } else {
+                    BucketInfo bi = (BucketInfo) entry;
+                    return new Binding.KeyValuePair(Integer.toString(pos), "b" + bi.getId()
+ ":" + bi.getSize());
+                }
+            }
+
+            @Override
+            public void remove() {
+                throw new UnsupportedOperationException();
+            }
+        });
+    }
+
+    static ChildNodeEntriesTree deserialize(RevisionProvider provider, Binding binding) throws
Exception {
+        ChildNodeEntriesTree newInstance = new ChildNodeEntriesTree(provider);
+        newInstance.count = binding.readIntValue(":count");
+        Iterator<Binding.KeyValuePair> iter = binding.read(":index");
+        int pos = -1;
+        while (iter.hasNext()) {
+            Binding.KeyValuePair kvp = iter.next();
+            ++pos;
+            // deserialize index array entry
+            assert(pos == Integer.parseInt(kvp.getKey()));
+            if (kvp.getValue().length() == 0) {
+                newInstance.index[pos] = null;
+            } else if (kvp.getValue().charAt(0) == 'n') {
+                // todo opimize parsing
+                String parts[] = kvp.getValue().substring(1).split(":");
+                newInstance.index[pos] = new NodeInfo(parts[1], parts[0]);
+            } else {
+                // todo opimize parsing
+                String parts[] = kvp.getValue().substring(1).split(":");
+                newInstance.index[pos] = new BucketInfo(parts[0], Integer.parseInt(parts[1]));
+            }
+        }
+        return newInstance;
+    }
+
     //--------------------------------------------------------< inner classes >
 
     protected static interface IndexEntry {

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/CommitBuilder.java
Sun Feb  5 17:56:37 2012
@@ -60,7 +60,7 @@ public class CommitBuilder {
         if (modParent.getChildNodeEntry(nodeName) != null) {
             throw new Exception("there's already a child node with name '" + nodeName + "'");
         }
-        MutableNode newChild = new MutableNode();
+        MutableNode newChild = new MutableNode(store);
         newChild.getProperties().putAll(properties);
 
         // id will be computed on commit
@@ -248,7 +248,7 @@ public class CommitBuilder {
         if (node == null) {
             MutableNode parent = staged.get("/");
             if (parent == null) {
-                parent = new MutableNode(store.getRootNode(baseRevId));
+                parent = new MutableNode(store.getRootNode(baseRevId), store);
                 staged.put("/", parent);
             }
             node = parent;
@@ -263,7 +263,7 @@ public class CommitBuilder {
                     if (cne == null) {
                         throw new NotFoundException(nodePath);
                     }
-                    node = new MutableNode(store.getNode(cne.getId()));
+                    node = new MutableNode(store.getNode(cne.getId()), store);
                     staged.put(path, node);
                 }
                 parent = node;
@@ -352,7 +352,7 @@ public class CommitBuilder {
         NodeDelta ourChanges = new NodeDelta(baseNode, ourNode);
 
         // merge non-conflicting changes
-        MutableNode mergedNode = new MutableNode(theirNode);
+        MutableNode mergedNode = new MutableNode(theirNode, store);
         staged.put(path, mergedNode);
 
         mergedNode.getProperties().putAll(ourChanges.getAddedProperties());

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableNode.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableNode.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/MutableNode.java
Sun Feb  5 17:56:37 2012
@@ -16,8 +16,8 @@
  */
 package org.apache.jackrabbit.mk.model;
 
-import org.apache.jackrabbit.mk.store.Binding;
 import org.apache.jackrabbit.mk.store.PersistHook;
+import org.apache.jackrabbit.mk.store.RevisionProvider;
 import org.apache.jackrabbit.mk.store.RevisionStore;
 
 /**
@@ -25,11 +25,12 @@ import org.apache.jackrabbit.mk.store.Re
  */
 public class MutableNode extends AbstractNode implements PersistHook {
 
-    public MutableNode() {
+    public MutableNode(RevisionProvider provider) {
+        super(provider);
     }
 
-    public MutableNode(Node other) {
-        super(other);
+    public MutableNode(Node other, RevisionProvider provider) {
+        super(other, provider);
     }
 
     public ChildNodeEntry add(ChildNodeEntry newEntry) {
@@ -44,12 +45,6 @@ public class MutableNode extends Abstrac
         return childEntries.rename(oldName, newName);
     }
 
-    @Override
-    public void serialize(Binding binding) throws Exception {
-        // todo serialize inlined child entries
-        super.serialize(binding);
-    }
-
     //----------------------------------------------------------< PersistHook >
 
     @Override

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/StoredNode.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/StoredNode.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/StoredNode.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/model/StoredNode.java
Sun Feb  5 17:56:37 2012
@@ -32,26 +32,29 @@ public class StoredNode extends Abstract
 
     private final String id;
 
-    public static StoredNode deserialize(String id, Binding binding) throws Exception {
-        StoredNode newInstance = new StoredNode(id);
+    public static StoredNode deserialize(String id, RevisionProvider provider, Binding binding)
throws Exception {
+        StoredNode newInstance = new StoredNode(id, provider);
         Iterator<Binding.KeyValuePair> iter = binding.read(":props");
         while (iter.hasNext()) {
             Binding.KeyValuePair kvp = iter.next();
             newInstance.properties.put(kvp.getKey(), kvp.getValue());
         }
-        iter = binding.read(":children");
-        while (iter.hasNext()) {
-            Binding.KeyValuePair kvp = iter.next();
-            newInstance.childEntries.add(new ChildNodeEntry(kvp.getKey(), kvp.getValue()));
+        boolean inlined = binding.readIntValue(":inlined") != 0;
+        if (inlined) {
+            newInstance.childEntries = ChildNodeEntriesInlined.deserialize(provider, binding);
+        } else {
+            newInstance.childEntries = ChildNodeEntriesTree.deserialize(provider, binding);
         }
         return newInstance;
     }
 
-    private StoredNode(String id) {
+    private StoredNode(String id, RevisionProvider provider) {
+        super(provider);
         this.id = id;
     }
     
-    public StoredNode(String id, Map<String, String> properties, Iterator<ChildNodeEntry>
cneIt) {
+    public StoredNode(String id, RevisionProvider provider, Map<String, String> properties,
Iterator<ChildNodeEntry> cneIt) {
+        super(provider);
         this.id = id;
         this.properties.putAll(properties);
         while (cneIt.hasNext()) {
@@ -59,8 +62,8 @@ public class StoredNode extends Abstract
         }
     }
 
-    public StoredNode(String id, Node node) {
-        super(node);
+    public StoredNode(String id, Node node, RevisionProvider provider) {
+        super(node, provider);
         this.id = id;
     }
 

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/AbstractPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/AbstractPersistenceManager.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/AbstractPersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/AbstractPersistenceManager.java
Sun Feb  5 17:56:37 2012
@@ -87,7 +87,7 @@ public abstract class AbstractPersistenc
         headId = readHead();
         if (headId == null || headId.length() == 0) {
             // assume virgin repository
-            String rootNodeId = writeNode(new MutableNode());
+            String rootNodeId = writeNode(new MutableNode(this));
             MutableCommit initialCommit = new MutableCommit();
             initialCommit.setCommitTS(System.currentTimeMillis());
             initialCommit.setRootNodeId(rootNodeId);
@@ -136,7 +136,7 @@ public abstract class AbstractPersistenc
             callback.postPersist(this);
         }
         
-        cache.put(id, new StoredNode(id, node));
+        cache.put(id, new StoredNode(id, node, this));
 
         return id;
     }
@@ -156,8 +156,7 @@ public abstract class AbstractPersistenc
             callback.postPersist(this);
         }
 
-        // todo is it correct to cache a clone?
-        cache.put(id, bucket.clone());
+        cache.put(id, bucket);
 
         return id;
     }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/BDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/BDbPersistenceManager.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/BDbPersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/BDbPersistenceManager.java
Sun Feb  5 17:56:37 2012
@@ -130,7 +130,7 @@ public class BDbPersistenceManager exten
 
         if (db.get(null, key, data, LockMode.DEFAULT) == OperationStatus.SUCCESS) {
             ByteArrayInputStream in = new ByteArrayInputStream(data.getData());
-            return StoredNode.deserialize(id, new BinaryBinding(in));
+            return StoredNode.deserialize(id, this, new BinaryBinding(in));
         } else {
             throw new NotFoundException(id);
         }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/FSPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/FSPersistenceManager.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/FSPersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/FSPersistenceManager.java
Sun Feb  5 17:56:37 2012
@@ -88,7 +88,7 @@ public class FSPersistenceManager extend
         if (f.exists()) {
             BufferedInputStream in = new BufferedInputStream(new FileInputStream(f));
             try {
-                return StoredNode.deserialize(id, new BinaryBinding(in));
+                return StoredNode.deserialize(id, this, new BinaryBinding(in));
             } finally {
                 in.close();
             }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/H2PersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/H2PersistenceManager.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/H2PersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/H2PersistenceManager.java
Sun Feb  5 17:56:37 2012
@@ -121,7 +121,7 @@ public class H2PersistenceManager extend
                 ResultSet rs = stmt.executeQuery();
                 if (rs.next()) {
                     ByteArrayInputStream in = new ByteArrayInputStream(rs.getBytes(1));
-                    return StoredNode.deserialize(id, new BinaryBinding(in));
+                    return StoredNode.deserialize(id, this, new BinaryBinding(in));
                 } else {
                     throw new NotFoundException(id);
                 }

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/InMemPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/InMemPersistenceManager.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/InMemPersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/InMemPersistenceManager.java
Sun Feb  5 17:56:37 2012
@@ -83,7 +83,7 @@ public class InMemPersistenceManager ext
         String id = StringUtils.convertBytesToHex(idFactory.createContentId(bytes));
 
         if (!nodes.containsKey(id)) {
-            nodes.put(id, StoredNode.deserialize(id, new BinaryBinding(new ByteArrayInputStream(bytes))));
+            nodes.put(id, StoredNode.deserialize(id, this, new BinaryBinding(new ByteArrayInputStream(bytes))));
         }
 
         return id;

Modified: jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/MongoPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/MongoPersistenceManager.java?rev=1240770&r1=1240769&r2=1240770&view=diff
==============================================================================
--- jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/MongoPersistenceManager.java
(original)
+++ jackrabbit/sandbox/microkernel/src/main/java/org/apache/jackrabbit/mk/store/MongoPersistenceManager.java
Sun Feb  5 17:56:37 2012
@@ -129,9 +129,9 @@ public class MongoPersistenceManager ext
             // todo support partitioned child node lists
             if (BINARY_FORMAT) {
                 byte[] bytes = (byte[]) nodeObject.get(DATA_FIELD);
-                return StoredNode.deserialize(id, new BinaryBinding(new ByteArrayInputStream(bytes)));
+                return StoredNode.deserialize(id, this, new BinaryBinding(new ByteArrayInputStream(bytes)));
             } else {
-                return StoredNode.deserialize(id, new DBObjectBinding(nodeObject));
+                return StoredNode.deserialize(id, this, new DBObjectBinding(nodeObject));
             }
         } else {
             throw new NotFoundException(id);



Mime
View raw message