jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1298893 - in /jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit: ./ state/
Date Fri, 09 Mar 2012 15:55:19 GMT
Author: mduerig
Date: Fri Mar  9 15:55:19 2012
New Revision: 1298893

URL: http://svn.apache.org/viewvc?rev=1298893&view=rev
Log:
Microkernel based prototype of JCR implementation (WIP)
- rename NodeState to TransientNodeState to avoid naming conflict with NodeState interface
in Microkernel (part 3)

Added:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCache.java
      - copied, changed from r1298888, jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCache.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCacheImpl.java
      - copied, changed from r1298888, jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCacheImpl.java
Removed:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCache.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCacheImpl.java
Modified:
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/CacheFactory.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/GlobalContext.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionContext.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionImpl.java
    jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/CacheFactory.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/CacheFactory.java?rev=1298893&r1=1298892&r2=1298893&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/CacheFactory.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/CacheFactory.java
Fri Mar  9 15:55:19 2012
@@ -20,8 +20,8 @@
 package org.apache.jackrabbit;
 
 import org.apache.jackrabbit.configuration.RepositoryConfiguration;
-import org.apache.jackrabbit.state.NodeStateCache;
+import org.apache.jackrabbit.state.TransientNodeStateCache;
 
 public interface CacheFactory {
-    NodeStateCache create(RepositoryConfiguration configuration);
+    TransientNodeStateCache create(RepositoryConfiguration configuration);
 }

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/GlobalContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/GlobalContext.java?rev=1298893&r1=1298892&r2=1298893&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/GlobalContext.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/GlobalContext.java
Fri Mar  9 15:55:19 2012
@@ -25,7 +25,7 @@ import org.apache.jackrabbit.mk.MicroKer
 import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.security.Authenticator;
 import org.apache.jackrabbit.security.AuthenticatorImpl;
-import org.apache.jackrabbit.state.NodeStateCacheImpl;
+import org.apache.jackrabbit.state.TransientNodeStateCacheImpl;
 import org.apache.jackrabbit.utils.Unchecked;
 
 import javax.jcr.Repository;
@@ -49,7 +49,7 @@ public class GlobalContext {
         put(Repository.class, RepositoryImpl.create(this));
         put(Authenticator.class, AuthenticatorImpl.INSTANCE);
         put(SessionFactory.class, SessionImpl.FACTORY);
-        put(CacheFactory.class, NodeStateCacheImpl.FACTORY);
+        put(CacheFactory.class, TransientNodeStateCacheImpl.FACTORY);
     }
 
     public <T> T getInstance(Class<T> forClass) {

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionContext.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionContext.java?rev=1298893&r1=1298892&r2=1298893&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionContext.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionContext.java
Fri Mar  9 15:55:19 2012
@@ -21,7 +21,7 @@ package org.apache.jackrabbit;
 
 import org.apache.jackrabbit.mk.api.MicroKernel;
 import org.apache.jackrabbit.security.CredentialsInfo;
-import org.apache.jackrabbit.state.NodeStateCache;
+import org.apache.jackrabbit.state.TransientNodeStateCache;
 import org.apache.jackrabbit.state.TransientSpace;
 
 import javax.jcr.Session;
@@ -36,5 +36,5 @@ public interface SessionContext<T extend
     String getRevision();
     ValueFactory getValueFactory();
     TransientSpace getTransientSpace();
-    NodeStateCache getNodeStateCache();
+    TransientNodeStateCache getNodeStateCache();
 }

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionImpl.java?rev=1298893&r1=1298892&r2=1298893&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/SessionImpl.java
Fri Mar  9 15:55:19 2012
@@ -24,7 +24,7 @@ import org.apache.jackrabbit.mk.api.Micr
 import org.apache.jackrabbit.security.Authenticator;
 import org.apache.jackrabbit.security.CredentialsInfo;
 import org.apache.jackrabbit.state.TransientNodeState;
-import org.apache.jackrabbit.state.NodeStateCache;
+import org.apache.jackrabbit.state.TransientNodeStateCache;
 import org.apache.jackrabbit.state.TransientSpace;
 import org.xml.sax.ContentHandler;
 import org.xml.sax.SAXException;
@@ -55,7 +55,7 @@ public class SessionImpl implements Sess
     private final String workspaceName;
     private final MicroKernel microKernel;
     private final TransientSpace transientSpace;
-    private final NodeStateCache nodeStateCache;
+    private final TransientNodeStateCache nodeStateCache;
 
     private String revision;
     private boolean live = true;
@@ -104,7 +104,7 @@ public class SessionImpl implements Sess
         }
 
         @Override
-        public NodeStateCache getNodeStateCache() {
+        public TransientNodeStateCache getNodeStateCache() {
             return nodeStateCache;
         }
     };

Modified: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java?rev=1298893&r1=1298892&r2=1298893&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeState.java
Fri Mar  9 15:55:19 2012
@@ -207,7 +207,7 @@ public class TransientNodeState {
 
     //------------------------------------------< private >---
 
-    private NodeStateCache nodeStateCache() {
+    private TransientNodeStateCache nodeStateCache() {
         return sessionContext.getNodeStateCache();
     }
     
@@ -224,7 +224,7 @@ public class TransientNodeState {
     }
     
     private static TransientNodeState getNodeState(Context sessionContext, NodeDelta nodeDelta)
{
-        NodeStateCache cache = sessionContext.getNodeStateCache();
+        TransientNodeStateCache cache = sessionContext.getNodeStateCache();
         Path path = nodeDelta.getPath();
 
         TransientNodeState state = cache.get(path);

Copied: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCache.java
(from r1298888, jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCache.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCache.java?p2=jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCache.java&p1=jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCache.java&r1=1298888&r2=1298893&rev=1298893&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCache.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCache.java
Fri Mar  9 15:55:19 2012
@@ -21,7 +21,7 @@ package org.apache.jackrabbit.state;
 
 import org.apache.jackrabbit.Path;
 
-public interface NodeStateCache {
+public interface TransientNodeStateCache {
     TransientNodeState get(Path path);
     void put(Path path, TransientNodeState state);
     void remove(Path path);

Copied: jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCacheImpl.java
(from r1298888, jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCacheImpl.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCacheImpl.java?p2=jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCacheImpl.java&p1=jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCacheImpl.java&r1=1298888&r2=1298893&rev=1298893&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/NodeStateCacheImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-microkernel/src/main/java/org/apache/jackrabbit/state/TransientNodeStateCacheImpl.java
Fri Mar  9 15:55:19 2012
@@ -27,16 +27,16 @@ import org.apache.jackrabbit.utils.Unche
 
 import java.util.Map;
 
-public class NodeStateCacheImpl implements NodeStateCache {
+public class TransientNodeStateCacheImpl implements TransientNodeStateCache {
     public static final CacheFactory FACTORY = new CacheFactory() {
         @Override
-        public NodeStateCache create(RepositoryConfiguration configuration) {
+        public TransientNodeStateCache create(RepositoryConfiguration configuration) {
             int size = configuration.getNodeStateCacheSize();
-            return size > 0 ? new NodeStateCacheImpl(size) : NO_CACHE;
+            return size > 0 ? new TransientNodeStateCacheImpl(size) : NO_CACHE;
         }
     };
 
-    private static final NodeStateCache NO_CACHE = new NodeStateCache() {
+    private static final TransientNodeStateCache NO_CACHE = new TransientNodeStateCache()
{
         @Override
         public TransientNodeState get(Path path) {
             return null;
@@ -54,7 +54,7 @@ public class NodeStateCacheImpl implemen
 
     private final Map<Path, TransientNodeState> cache;
 
-    public NodeStateCacheImpl(int size) {
+    public TransientNodeStateCacheImpl(int size) {
         cache = Unchecked.cast(new LRUMap(size));
     }
 



Mime
View raw message