jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1170276 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: ItemCacheImpl.java ItemImpl.java
Date Tue, 13 Sep 2011 18:07:46 GMT
Author: mduerig
Date: Tue Sep 13 18:07:46 2011
New Revision: 1170276

URL: http://svn.apache.org/viewvc?rev=1170276&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP) 
refactor: improve ItemCache management

Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemCacheImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemCacheImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemCacheImpl.java?rev=1170276&r1=1170275&r2=1170276&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemCacheImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemCacheImpl.java
Tue Sep 13 18:07:46 2011
@@ -53,9 +53,6 @@ public class ItemCacheImpl implements It
 
     //----------------------------------------------< ItemLifeCycleListener >---
 
-    /**
-     * @see ItemLifeCycleListener#itemCreated(Item)
-     */
     @Override
     public void itemCreated(Item item, ItemState state) {
         cacheItem(state, item);
@@ -63,12 +60,8 @@ public class ItemCacheImpl implements It
 
     @Override
     public void itemUpdated(Item item, ItemState state, boolean modified) {
-        // touch the corresponding cache entry
-        Item cacheEntry = getItem(state);
-        if (cacheEntry == null) {
-            // .. or add the item to the cache, if not present yet.
-            cacheItem(state, item);
-        }
+        // do nothing: we don't touch he cache here since the LRU
+        // should only be affected by the client side.
     }
 
     @Override

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java?rev=1170276&r1=1170275&r2=1170276&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/ItemImpl.java
Tue Sep 13 18:07:46 2011
@@ -260,9 +260,7 @@ public abstract class ItemImpl implement
      */
     @Override
     public void statusChanged(ItemState state, Status previousStatus) {
-        if (state != this.state) {
-            throw new IllegalArgumentException("Invalid argument: ItemState with changed
status must be this.state.");
-        }
+        assert state == this.state;
 
         switch (state.getStatus()) {
             //   Notify listeners about an update (status was MODIFIED before)



Mime
View raw message