jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1171505 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi: JcrLockManager.java LockManagerImpl.java NodeImpl.java WorkspaceImpl.java lock/LockManagerImpl.java lock/LockStateManagerImpl.java
Date Fri, 16 Sep 2011 11:16:07 GMT
Author: mduerig
Date: Fri Sep 16 11:16:06 2011
New Revision: 1171505

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

Added:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LockManagerImpl.java
      - copied, changed from r1171436, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrLockManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockStateManagerImpl.java
  (contents, props changed)
      - copied, changed from r1171436, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrLockManager.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java

Copied: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LockManagerImpl.java
(from r1171436, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrLockManager.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LockManagerImpl.java?p2=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LockManagerImpl.java&p1=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrLockManager.java&r1=1171436&r2=1171505&rev=1171505&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/JcrLockManager.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/LockManagerImpl.java
Fri Sep 16 11:16:06 2011
@@ -27,12 +27,12 @@ import javax.jcr.lock.LockManager;
 /**
  * {@code JcrLockManager}...
  */
-public class JcrLockManager implements LockManager {
+public class LockManagerImpl implements LockManager {
     private final LockStateManager lockStateMgr;
     private final ItemManager itemManager;
     private final PathResolver resolver;
 
-    protected JcrLockManager(SessionImpl session) {
+    protected LockManagerImpl(SessionImpl session) {
         lockStateMgr = session.getLockStateManager();
         itemManager = session.getItemManager();
         resolver = session.getNamePathResolver();

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java?rev=1171505&r1=1171504&r2=1171505&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/NodeImpl.java
Fri Sep 16 11:16:06 2011
@@ -1137,8 +1137,8 @@ public class NodeImpl extends ItemImpl<N
             // a node that is new or not lockable never holds a lock
             return false;
         } else {
-            LockStateManager lMgr = session.getLockStateManager();
-            return lMgr.isLocked(getNodeState()) && lMgr.getLock(getNodeState()).getNode().isSame(this);
+            LockStateManager lockStateMgr = session.getLockStateManager();
+            return lockStateMgr.isLocked(getNodeState()) && lockStateMgr.getLock(getNodeState()).getNode().isSame(this);
         }
     }
 

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java?rev=1171505&r1=1171504&r2=1171505&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/WorkspaceImpl.java
Fri Sep 16 11:16:06 2011
@@ -19,8 +19,8 @@ package org.apache.jackrabbit.jcr2spi;
 import org.apache.commons.io.IOUtils;
 import org.apache.jackrabbit.jcr2spi.config.RepositoryConfig;
 import org.apache.jackrabbit.jcr2spi.hierarchy.HierarchyManager;
-import org.apache.jackrabbit.jcr2spi.lock.LockManagerImpl;
 import org.apache.jackrabbit.jcr2spi.lock.LockStateManager;
+import org.apache.jackrabbit.jcr2spi.lock.LockStateManagerImpl;
 import org.apache.jackrabbit.jcr2spi.nodetype.EffectiveNodeTypeProvider;
 import org.apache.jackrabbit.jcr2spi.nodetype.ItemDefinitionProvider;
 import org.apache.jackrabbit.jcr2spi.nodetype.NodeTypeDefinitionProvider;
@@ -87,12 +87,12 @@ public class WorkspaceImpl implements Wo
      */
     private final WorkspaceManager wspManager;
 
-    private LockStateManager lockManager;
+    private LockStateManager lockStateMgr;
     private ObservationManager obsManager;
     private QueryManager qManager;
     private VersionStateManager versionStateManager;
 
-    private LockManager jcrLockManager;
+    private LockManager lockMgr;
     private VersionManagerImpl versionManager;
 
     public WorkspaceImpl(String name, SessionImpl session, RepositoryConfig config, SessionInfo
sessionInfo)
@@ -327,10 +327,10 @@ public class WorkspaceImpl implements Wo
     public LockManager getLockManager() throws RepositoryException {
         session.checkIsAlive();
         session.checkSupportedOption(Repository.OPTION_LOCKING_SUPPORTED);
-        if (jcrLockManager == null) {
-            jcrLockManager = new JcrLockManager(session);
+        if (lockMgr == null) {
+            lockMgr = new LockManagerImpl(session);
         }
-        return jcrLockManager;
+        return lockMgr;
     }
 
     @Override
@@ -362,10 +362,10 @@ public class WorkspaceImpl implements Wo
 
     @Override
     public LockStateManager getLockStateManager() {
-        if (lockManager == null) {
-            lockManager = createLockManager(wspManager, session.getItemManager());
+        if (lockStateMgr == null) {
+            lockStateMgr = createStateLockManager(wspManager, session.getItemManager());
         }
-        return lockManager;
+        return lockStateMgr;
     }
 
     @Override
@@ -476,10 +476,10 @@ public class WorkspaceImpl implements Wo
      * @param itemManager the item manager.
      * @return a new {@code LockStateManager} instance.
      */
-    protected LockStateManager createLockManager(WorkspaceManager wspManager, ItemManager
itemManager) {
-        LockManagerImpl lMgr = new LockManagerImpl(wspManager, itemManager, session.getCacheBehaviour());
-        session.addListener(lMgr);
-        return lMgr;
+    protected LockStateManager createStateLockManager(WorkspaceManager wspManager, ItemManager
itemManager) {
+        LockStateManagerImpl lockStateMgr = new LockStateManagerImpl(wspManager, itemManager,
session.getCacheBehaviour());
+        session.addListener(lockStateMgr);
+        return lockStateMgr;
     }
 
     /**

Copied: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockStateManagerImpl.java
(from r1171436, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockStateManagerImpl.java?p2=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockStateManagerImpl.java&p1=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java&r1=1171436&r2=1171505&rev=1171505&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockManagerImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockStateManagerImpl.java
Fri Sep 16 11:16:06 2011
@@ -53,8 +53,8 @@ import java.util.Map;
  * TODO: Lock objects obtained through this mgr are not informed if another session is or
becomes lock-holder and
  * removes the lock again.
  */
-public class LockManagerImpl implements LockStateManager, SessionListener {
-    private static final Logger log = LoggerFactory.getLogger(LockManagerImpl.class);
+public class LockStateManagerImpl implements LockStateManager, SessionListener {
+    private static final Logger log = LoggerFactory.getLogger(LockStateManagerImpl.class);
 
     private static final long TIMEOUT_EXPIRED = -1;
     private static final long TIMEOUT_INFINITE = Long.MAX_VALUE;
@@ -77,7 +77,7 @@ public class LockManagerImpl implements 
      */
     private final Map<NodeState, LockImpl> lockMap;
 
-    public LockManagerImpl(WorkspaceManager wspManager, ItemManager itemManager, CacheBehaviour
cacheBehaviour) {
+    public LockStateManagerImpl(WorkspaceManager wspManager, ItemManager itemManager, CacheBehaviour
cacheBehaviour) {
         this.wspManager = wspManager;
         this.itemManager = itemManager;
         this.cacheBehaviour = cacheBehaviour;

Propchange: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockStateManagerImpl.java
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-jcr2spi/src/main/java/org/apache/jackrabbit/jcr2spi/lock/LockStateManagerImpl.java
------------------------------------------------------------------------------
    svn:keywords = author date id revision url



Mime
View raw message