You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jackrabbit.apache.org by th...@apache.org on 2009/12/09 15:55:12 UTC

svn commit: r888817 - in /jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool: AbstractBundlePersistenceManager.java CachingPersistenceManager.java

Author: thomasm
Date: Wed Dec  9 14:55:11 2009
New Revision: 888817

URL: http://svn.apache.org/viewvc?rev=888817&view=rev
Log:
JCR-2429 Clustering is broken due to duplicated CachingPersistenceManager interface

Removed:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/CachingPersistenceManager.java
Modified:
    jackrabbit/trunk/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/pool/AbstractBundlePersistenceManager.java

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=888817&r1=888816&r2=888817&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 Dec  9 14:55:11 2009
@@ -30,6 +30,7 @@
 import org.apache.jackrabbit.core.id.ItemId;
 import org.apache.jackrabbit.core.id.NodeId;
 import org.apache.jackrabbit.core.id.PropertyId;
+import org.apache.jackrabbit.core.persistence.CachingPersistenceManager;
 import org.apache.jackrabbit.core.persistence.IterablePersistenceManager;
 import org.apache.jackrabbit.core.persistence.PMContext;
 import org.apache.jackrabbit.core.persistence.PersistenceManager;
@@ -131,7 +132,7 @@
     public void setBundleCacheSize(String bundleCacheSize) {
         this.bundleCacheSize = Long.parseLong(bundleCacheSize) * 1024 * 1024;
     }
-    
+
     /**
      * Creates the folder path for the given node id that is suitable for
      * storing states in a filesystem.
@@ -388,10 +389,10 @@
         bundles = new BundleCache(bundleCacheSize);
         missing = new LRUNodeIdCache();
     }
-    
+
     /**
      * {@inheritDoc}
-     *  
+     *
      *  Closes the persistence manager, release acquired resourecs.
      */
     public void close() throws Exception {
@@ -509,7 +510,7 @@
 
     /**
      * Stores the given changelog and updates the bundle cache.
-     * 
+     *
      * @param changeLog the changelog to store
      * @throws ItemStateException on failure
      */
@@ -539,7 +540,7 @@
         for (ItemState state : changeLog.modifiedStates()) {
             if (state.isNode()) {
                 NodeId nodeId = (NodeId) state.getId();
-                NodePropBundle bundle = (NodePropBundle) modified.get(nodeId);
+                NodePropBundle bundle = modified.get(nodeId);
                 if (bundle == null) {
                     bundle = getBundle(nodeId);
                     if (bundle == null) {
@@ -557,7 +558,7 @@
                     continue;
                 }
                 NodeId nodeId = id.getParentId();
-                NodePropBundle bundle = (NodePropBundle) modified.get(nodeId);
+                NodePropBundle bundle = modified.get(nodeId);
                 if (bundle == null) {
                     bundle = getBundle(nodeId);
                     if (bundle == null) {
@@ -580,7 +581,7 @@
                 PropertyId id = (PropertyId) state.getId();
                 NodeId nodeId = id.getParentId();
                 if (!deleted.contains(nodeId)) {
-                    NodePropBundle bundle = (NodePropBundle) modified.get(nodeId);
+                    NodePropBundle bundle = modified.get(nodeId);
                     if (bundle == null) {
                         // should actually not happen
                         log.warn("deleted property state's parent not modified!");
@@ -605,7 +606,7 @@
                     continue;
                 }
                 NodeId nodeId = id.getParentId();
-                NodePropBundle bundle = (NodePropBundle) modified.get(nodeId);
+                NodePropBundle bundle = modified.get(nodeId);
                 if (bundle == null) {
                     // should actually not happen
                     log.warn("added property state's parent not modified!");