jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r650499 - in /jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle: AbstractBundlePersistenceManager.java BundleDbPersistenceManager.java
Date Tue, 22 Apr 2008 12:53:57 GMT
Author: jukka
Date: Tue Apr 22 05:53:52 2008
New Revision: 650499

URL: http://svn.apache.org/viewvc?rev=650499&view=rev
Log:
1.4: Merged revision 649760 (JCR-1541)

Modified:
    jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
    jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java?rev=650499&r1=650498&r2=650499&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/AbstractBundlePersistenceManager.java
Tue Apr 22 05:53:52 2008
@@ -130,8 +130,8 @@
     private long bundleCacheSize = 8 * 1024 * 1024;
 
     /**
-     * Returns the size of the bundlecache in megabytes.
-     * @return the size of the bundlecache in megabytes.
+     * Returns the size of the bundle cache in megabytes.
+     * @return the size of the bundle cache in megabytes.
      */
     public String getBundleCacheSize() {
         return String.valueOf(bundleCacheSize/(1024 * 1024));
@@ -411,7 +411,7 @@
         bundles = new BundleCache(bundleCacheSize);
         missing = new LRUNodeIdCache();
 
-        // init prop defs
+        // init property definitions
         if (context.getNodeTypeRegistry() != null) {
             idJcrUUID = context.getNodeTypeRegistry().getEffectiveNodeType(NameConstants.MIX_REFERENCEABLE).getApplicablePropertyDef(
                     NameConstants.JCR_UUID, PropertyType.STRING, false).getId();
@@ -656,7 +656,7 @@
     }
 
     /**
-     * Gets the bundle for the given nodeid.
+     * Gets the bundle for the given node id.
      *
      * @param id the id of the bundle to retrieve.
      * @return the bundle or <code>null</code> if the bundle does not exist
@@ -718,6 +718,15 @@
      * {@inheritDoc}
      */
     public void checkConsistency(String[] uuids, boolean recursive, boolean fix) {
+    }
+
+    /**
+     * Evicts the bundle with <code>id</code> from the bundle cache.
+     *
+     * @param id the id of the bundle.
+     */
+    protected void evictBundle(NodeId id) {
+        bundles.remove(id);
     }
 
 }

Modified: jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java?rev=650499&r1=650498&r2=650499&view=diff
==============================================================================
--- jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
(original)
+++ jackrabbit/branches/1.4/jackrabbit-core/src/main/java/org/apache/jackrabbit/core/persistence/bundle/BundleDbPersistenceManager.java
Tue Apr 22 05:53:52 2008
@@ -967,6 +967,7 @@
                     log.info(name + ": Fixing bundle '" + bundle.getId() + "'");
                     bundle.markOld(); // use UPDATE instead of INSERT
                     storeBundle(bundle);
+                    evictBundle(bundle.getId());
                 } catch (ItemStateException e) {
                     log.error(name + ": Error storing fixed bundle: " + e);
                 }



Mime
View raw message