jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1002653 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence: bundle/ pool/
Date Wed, 29 Sep 2010 14:27:12 GMT
Author: jukka
Date: Wed Sep 29 14:27:11 2010
New Revision: 1002653

URL: http://svn.apache.org/viewvc?rev=1002653&view=rev
Log:
JCR-2762: Optimize bundle serialization

AbstractBundlePersistenceManager only needs access to the BLOBStore used by a subclass, not
the BundleBinding instance

Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/AbstractBundlePersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleFsPersistenceManager.java

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java?rev=1002653&r1=1002652&r2=1002653&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
Wed Sep 29 14:27:11 2010
@@ -36,6 +36,7 @@ import org.apache.jackrabbit.core.persis
 import org.apache.jackrabbit.core.persistence.PMContext;
 import org.apache.jackrabbit.core.persistence.PersistenceManager;
 import org.apache.jackrabbit.core.util.StringIndex;
+import org.apache.jackrabbit.core.persistence.util.BLOBStore;
 import org.apache.jackrabbit.core.persistence.util.BundleBinding;
 import org.apache.jackrabbit.core.persistence.util.BundleCache;
 import org.apache.jackrabbit.core.persistence.util.HashMapIndex;
@@ -370,10 +371,11 @@ public abstract class AbstractBundlePers
             throws ItemStateException;
 
     /**
-     * Returns the bundle binding that is used for serializing the bundles.
-     * @return the bundle binding
+     * Returns the BLOB store used by this persistence manager.
+     *
+     * @return BLOB store
      */
-    protected abstract BundleBinding getBinding();
+    protected abstract BLOBStore getBlobStore();
 
     //-------------------------------------------------< PersistenceManager >---
 
@@ -447,7 +449,7 @@ public abstract class AbstractBundlePers
             } else {
                 throw new NoSuchItemStateException(id.toString());
             }
-            bundle.addProperty(state, getBinding().getBlobStore());
+            bundle.addProperty(state, getBlobStore());
         }
         return state;
     }
@@ -567,8 +569,7 @@ public abstract class AbstractBundlePers
                     }
                     modified.put(nodeId, bundle);
                 }
-                bundle.addProperty(
-                        (PropertyState) state, getBinding().getBlobStore());
+                bundle.addProperty((PropertyState) state, getBlobStore());
             }
         }
         // add removed properties
@@ -593,8 +594,7 @@ public abstract class AbstractBundlePers
                         }
                         modified.put(nodeId, bundle);
                     }
-                    bundle.removeProperty(
-                            id.getName(), getBinding().getBlobStore());
+                    bundle.removeProperty(id.getName(), getBlobStore());
                 }
             }
         }
@@ -619,8 +619,7 @@ public abstract class AbstractBundlePers
                     }
                     modified.put(nodeId, bundle);
                 }
-                bundle.addProperty(
-                        (PropertyState) state, getBinding().getBlobStore());
+                bundle.addProperty((PropertyState) state, getBlobStore());
             }
         }
 
@@ -672,7 +671,7 @@ public abstract class AbstractBundlePers
      */
     private void deleteBundle(NodePropBundle bundle) throws ItemStateException {
         destroyBundle(bundle);
-        bundle.removeAllProperties(getBinding().getBlobStore());
+        bundle.removeAllProperties(getBlobStore());
         bundles.remove(bundle.getId());
         missing.put(bundle.getId());
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java?rev=1002653&r1=1002652&r2=1002653&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
Wed Sep 29 14:27:11 2010
@@ -623,8 +623,9 @@ public class BundleDbPersistenceManager 
     /**
      * {@inheritDoc}
      */
-    protected BundleBinding getBinding() {
-        return binding;
+    @Override
+    protected BLOBStore getBlobStore() {
+        return blobStore;
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java?rev=1002653&r1=1002652&r2=1002653&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleFsPersistenceManager.java
Wed Sep 29 14:27:11 2010
@@ -205,8 +205,9 @@ public class BundleFsPersistenceManager 
     /**
      * {@inheritDoc}
      */
-    protected BundleBinding getBinding() {
-        return binding;
+    @Override
+    protected BLOBStore getBlobStore() {
+        return blobStore;
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/AbstractBundlePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/AbstractBundlePersistenceManager.java?rev=1002653&r1=1002652&r2=1002653&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/AbstractBundlePersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/AbstractBundlePersistenceManager.java
Wed Sep 29 14:27:11 2010
@@ -33,7 +33,7 @@ import org.apache.jackrabbit.core.persis
 import org.apache.jackrabbit.core.persistence.IterablePersistenceManager;
 import org.apache.jackrabbit.core.persistence.PMContext;
 import org.apache.jackrabbit.core.persistence.PersistenceManager;
-import org.apache.jackrabbit.core.persistence.util.BundleBinding;
+import org.apache.jackrabbit.core.persistence.util.BLOBStore;
 import org.apache.jackrabbit.core.persistence.util.BundleCache;
 import org.apache.jackrabbit.core.persistence.util.HashMapIndex;
 import org.apache.jackrabbit.core.persistence.util.LRUNodeIdCache;
@@ -370,10 +370,11 @@ public abstract class AbstractBundlePers
             throws ItemStateException;
 
     /**
-     * Returns the bundle binding that is used for serializing the bundles.
-     * @return the bundle binding
+     * Returns the BLOB store used by this persistence manager.
+     *
+     * @return BLOB store
      */
-    protected abstract BundleBinding getBinding();
+    protected abstract BLOBStore getBlobStore();
 
     //-------------------------------------------------< PersistenceManager >---
 
@@ -445,7 +446,7 @@ public abstract class AbstractBundlePers
             } else {
                 throw new NoSuchItemStateException(id.toString());
             }
-            bundle.addProperty(state, getBinding().getBlobStore());
+            bundle.addProperty(state, getBlobStore());
         }
         return state;
     }
@@ -565,8 +566,7 @@ public abstract class AbstractBundlePers
                     }
                     modified.put(nodeId, bundle);
                 }
-                bundle.addProperty(
-                        (PropertyState) state, getBinding().getBlobStore());
+                bundle.addProperty((PropertyState) state, getBlobStore());
             }
         }
         // add removed properties
@@ -591,8 +591,7 @@ public abstract class AbstractBundlePers
                         }
                         modified.put(nodeId, bundle);
                     }
-                    bundle.removeProperty(
-                            id.getName(), getBinding().getBlobStore());
+                    bundle.removeProperty(id.getName(), getBlobStore());
                 }
             }
         }
@@ -617,8 +616,7 @@ public abstract class AbstractBundlePers
                     }
                     modified.put(nodeId, bundle);
                 }
-                bundle.addProperty(
-                        (PropertyState) state, getBinding().getBlobStore());
+                bundle.addProperty((PropertyState) state, getBlobStore());
             }
         }
 
@@ -670,7 +668,7 @@ public abstract class AbstractBundlePers
      */
     private void deleteBundle(NodePropBundle bundle) throws ItemStateException {
         destroyBundle(bundle);
-        bundle.removeAllProperties(getBinding().getBlobStore());
+        bundle.removeAllProperties(getBlobStore());
         bundles.remove(bundle.getId());
         missing.put(bundle.getId());
     }

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java?rev=1002653&r1=1002652&r2=1002653&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleDbPersistenceManager.java
Wed Sep 29 14:27:11 2010
@@ -590,8 +590,9 @@ public class BundleDbPersistenceManager 
     /**
      * {@inheritDoc}
      */
-    protected BundleBinding getBinding() {
-        return binding;
+    @Override
+    protected BLOBStore getBlobStore() {
+        return blobStore;
     }
 
     /**

Modified: jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleFsPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleFsPersistenceManager.java?rev=1002653&r1=1002652&r2=1002653&view=diff
==============================================================================
--- jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleFsPersistenceManager.java
(original)
+++ jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/BundleFsPersistenceManager.java
Wed Sep 29 14:27:11 2010
@@ -204,8 +204,9 @@ public class BundleFsPersistenceManager 
     /**
      * {@inheritDoc}
      */
-    protected BundleBinding getBinding() {
-        return binding;
+    @Override
+    protected BLOBStore getBlobStore() {
+        return blobStore;
     }
 
     /**



Mime
View raw message