jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1164504 - /jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Date Fri, 02 Sep 2011 12:28:43 GMT
Author: mduerig
Date: Fri Sep  2 12:28:42 2011
New Revision: 1164504

URL: http://svn.apache.org/viewvc?rev=1164504&view=rev
Log:
Microkernel based Jackrabbit prototype (WIP)
observation: avoid retrieving journal twice for some revisions

Modified:
    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/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/jackrabbit-mk/jackrabbit-spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java?rev=1164504&r1=1164503&r2=1164504&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  2 12:28:42 2011
@@ -251,6 +251,11 @@ public class SubscriptionImpl implements
         }
 
         public Collection<? extends EventBundle> getEventsBundles(String endRevision)
throws RepositoryException {
+            if (startRevision.equals(endRevision)) {
+                // Events already contained in previous bundle
+                return Collections.emptyList();
+            }
+
             String journal = microKernel.getJournal(startRevision, endRevision);
             log.debug("getJournal(" + startRevision + ", " + endRevision + ") returned "
+ journal.length() + " chars");
 



Mime
View raw message