jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1170372 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: ./ hierarchy/ state/
Date Tue, 13 Sep 2011 22:45:08 GMT
Author: mduerig
Date: Tue Sep 13 22:45:08 2011
New Revision: 1170372

URL: http://svn.apache.org/viewvc?rev=1170372&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP) 
minor refactor

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/hierarchy/EntryFactory.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntryImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientISFactory.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientItemStateManager.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=1170372&r1=1170371&r2=1170372&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 22:45:08 2011
@@ -60,8 +60,8 @@ public class ItemCacheImpl implements It
 
     @Override
     public void itemUpdated(Item item, ItemState state, boolean modified) {
-        // do nothing: we don't touch he cache here since the LRU
-        // should only be affected by the client side.
+        // do nothing: we don't touch the cache here since the LRU
+        // should only be affected by client side operations.
     }
 
     @Override
@@ -101,7 +101,7 @@ public class ItemCacheImpl implements It
         cache.remove(itemState);
     }
 
-    //--------------------------------------------------------==---< Object >---
+    //-------------------------------------------------------------< Object >---
 
     /**
      * Returns the the state of this instance in a human readable format.

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java?rev=1170372&r1=1170371&r2=1170372&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/EntryFactory.java
Tue Sep 13 22:45:08 2011
@@ -74,8 +74,6 @@ public class EntryFactory {
         this.isf = isf;
         this.listener = listener;
 
-        // todo: make this configurable if necessary
-        // this.invalidationStrategy = new NodeEntryImpl.EagerInvalidation();
         invalidationStrategy = new NodeEntryImpl.LazyInvalidation();
         rootEntry = NodeEntryImpl.createRootEntry(this);
     }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntryImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntryImpl.java?rev=1170372&r1=1170371&r2=1170372&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntryImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/hierarchy/HierarchyEntryImpl.java
Tue Sep 13 22:45:08 2011
@@ -53,7 +53,7 @@ abstract class HierarchyEntryImpl implem
     /**
      * Cached soft reference to the target ItemState.
      */
-    private Reference<ItemState> target;
+    private Reference<ItemState> itemState;
 
     /**
      * The name of the target item state.
@@ -170,11 +170,9 @@ abstract class HierarchyEntryImpl implem
      * @return the item state or {@code null} if the entry isn't resolved.
      */
     ItemState internalGetItemState() {
-        ItemState state = null;
-        if (target != null) {
-            state = target.get();
-        }
-        return state;
+        return itemState != null
+            ? itemState.get()
+            : null;
     }
 
     protected EntryFactory.InvalidationStrategy getInvalidationStrategy() {
@@ -252,7 +250,7 @@ abstract class HierarchyEntryImpl implem
         if (currentState == null) {
             // not connected yet to an item state. either a new entry or
             // an unresolved hierarchy entry.
-            target = new SoftReference<ItemState>(state);
+            itemState = new SoftReference<ItemState>(state);
         } else {
             // was already resolved before -> merge the existing state
             // with the passed state.

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java?rev=1170372&r1=1170371&r2=1170372&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/ItemState.java
Tue Sep 13 22:45:08 2011
@@ -54,8 +54,7 @@ public abstract class ItemState {
     /**
      * Listeners (weak references)
      */
-    private final transient Collection<ItemStateLifeCycleListener> listeners
-            = new WeakIdentityCollection<ItemStateLifeCycleListener>(5);
+    private final transient Collection<ItemStateLifeCycleListener> listeners = new
WeakIdentityCollection<ItemStateLifeCycleListener>(5);
 
     /**
      * The {@code ItemStateFactory} which is used to create new

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientISFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientISFactory.java?rev=1170372&r1=1170371&r2=1170372&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientISFactory.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientISFactory.java
Tue Sep 13 22:45:08 2011
@@ -143,7 +143,6 @@ public final class TransientISFactory ex
 
     @Override
     public void created(ItemState state) {
-        log.debug("ItemState created by WorkspaceItemStateFactory");
         notifyCreated(state);
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientItemStateManager.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientItemStateManager.java?rev=1170372&r1=1170371&r2=1170372&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientItemStateManager.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/state/TransientItemStateManager.java
Tue Sep 13 22:45:08 2011
@@ -67,6 +67,7 @@ public class TransientItemStateManager i
      * Removed states
      */
     private final Set<ItemState> removedStates = new LinkedHashSet<ItemState>();
+    
     /**
      * Stale states
      */
@@ -77,9 +78,6 @@ public class TransientItemStateManager i
      */
     private final Set<Operation> operations = new LinkedHashSet<Operation>();
 
-    /**
-     *
-     */
     TransientItemStateManager() {
     }
 



Mime
View raw message