jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1175045 - in /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel: RepositoryServiceImpl.java SessionInfoImpl.java SessionState.java SubscriptionImpl.java
Date Fri, 23 Sep 2011 21:58:11 GMT
Author: mduerig
Date: Fri Sep 23 21:58:10 2011
New Revision: 1175045

URL: http://svn.apache.org/viewvc?rev=1175045&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
refactor: rename SessionsState to SessionInfoImp

Added:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionInfoImpl.java
      - copied, changed from r1175041, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionState.java
Removed:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionState.java
Modified:
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
    jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java?rev=1175045&r1=1175044&r2=1175045&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/RepositoryServiceImpl.java
Fri Sep 23 21:58:10 2011
@@ -51,7 +51,6 @@ import org.apache.jackrabbit.spi.commons
 import org.apache.jackrabbit.spi.commons.EventFilterImpl;
 import org.apache.jackrabbit.spi.commons.ItemInfoCacheImpl;
 import org.apache.jackrabbit.spi.commons.QNodeDefinitionImpl;
-import org.apache.jackrabbit.spi.commons.SessionInfoImpl;
 import org.apache.jackrabbit.spi.commons.batch.ConsolidatingChangeLog;
 import org.apache.jackrabbit.spi.commons.name.NameConstants;
 import org.apache.jackrabbit.spi.commons.util.Function1;
@@ -276,7 +275,7 @@ public class RepositoryServiceImpl exten
             userId = anonymousId;
         }
 
-        return new SessionState(microKernel, userId, workspaceName);
+        return new SessionInfoImpl(microKernel, userId, workspaceName);
     }
 
     @Override
@@ -884,8 +883,8 @@ public class RepositoryServiceImpl exten
         }
     }
 
-    private static SessionState sessionInfoImpl(SessionInfo sessionInfo) throws RepositoryException
{
-        if (sessionInfo instanceof SessionState) {
+    private static SessionInfoImpl sessionInfoImpl(SessionInfo sessionInfo) throws RepositoryException
{
+        if (sessionInfo instanceof SessionInfoImpl) {
             return cast(sessionInfo);
         }
         else {

Copied: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionInfoImpl.java
(from r1175041, jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionState.java)
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionInfoImpl.java?p2=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionInfoImpl.java&p1=jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionState.java&r1=1175041&r2=1175045&rev=1175045&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionState.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SessionInfoImpl.java
Fri Sep 23 21:58:10 2011
@@ -20,7 +20,6 @@
 package org.apache.jackrabbit.spi2microkernel;
 
 import org.apache.jackrabbit.mk.api.MicroKernel;
-import org.apache.jackrabbit.spi.commons.SessionInfoImpl;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -29,13 +28,13 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.Callable;
 
-public class SessionState extends SessionInfoImpl {
-    private static final Logger log = LoggerFactory.getLogger(SessionState.class);
+public class SessionInfoImpl extends org.apache.jackrabbit.spi.commons.SessionInfoImpl {
+    private static final Logger log = LoggerFactory.getLogger(SessionInfoImpl.class);
 
     private final MicroKernel microKernel;
     private final List<String> commitLog = new ArrayList<String>();
 
-    public SessionState(MicroKernel microKernel, String userId, String workspaceName) {
+    public SessionInfoImpl(MicroKernel microKernel, String userId, String workspaceName)
{
         this.microKernel = microKernel;
         setUserID(userId);
         setWorkspacename(workspaceName);
@@ -86,10 +85,4 @@ public class SessionState extends Sessio
         return getCommitLog().contains(revisionId);
     }
 
-    //------------------------------------------< SessionInfo >---
-
-    @Override
-    public void refresh() {
-        super.refresh();    // todo implement refresh
-    }
 }

Modified: jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java?rev=1175045&r1=1175044&r2=1175045&view=diff
==============================================================================
--- jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
(original)
+++ jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Fri Sep 23 21:58:10 2011
@@ -61,19 +61,19 @@ public class SubscriptionImpl implements
     private static final Logger log = LoggerFactory.getLogger(SubscriptionImpl.class);
 
     private final MicroKernel microKernel;
-    private final SessionState sessionState;
+    private final SessionInfoImpl sessionInfo;
     private final WaitForCommit waitForCommit;
     private final Queue<EventSource> eventSources = new LinkedList<EventSource>();
 
-    public SubscriptionImpl(MicroKernel microKernel, SessionState sessionState) {
+    public SubscriptionImpl(MicroKernel microKernel, SessionInfoImpl sessionInfo) {
         this.microKernel = microKernel;
-        this.sessionState = sessionState;
+        this.sessionInfo = sessionInfo;
         waitForCommit = new WaitForCommit();
     }
 
     public void setEventFilters(EventFilter[] eventFilters) {
         synchronized (eventSources) {
-            eventSources.add(new EventSource(eventFilters, sessionState));
+            eventSources.add(new EventSource(eventFilters, sessionInfo));
         }
     }
 
@@ -244,9 +244,9 @@ public class SubscriptionImpl implements
         private final EventFilter[] eventFilters;
         private final String startRevision;
 
-        public EventSource(EventFilter[] eventFilters, SessionState sessionState) {
+        public EventSource(EventFilter[] eventFilters, SessionInfoImpl sessionInfo) {
             this.eventFilters = eventFilters;
-            startRevision = sessionState.getInitialRevision();
+            startRevision = sessionInfo.getInitialRevision();
         }
 
         public EventSource(EventFilter[] eventFilters, String startRevision) {
@@ -318,7 +318,7 @@ public class SubscriptionImpl implements
                     .setUserData(commitMessage.getUserData());
 
             Collection<Event> events = getEvents(changes, eventTemplate);
-            boolean isLocal = sessionState.hasRevision(revisionId);
+            boolean isLocal = sessionInfo.hasRevision(revisionId);
 
             // events.filter(event => eventFilters.any(_.accept(event, isLocal))
             for (Iterator<Event> it = events.iterator(); it.hasNext(); ) {



Mime
View raw message