jackrabbit-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1153218 - /jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Date Tue, 02 Aug 2011 17:43:41 GMT
Author: mduerig
Date: Tue Aug  2 17:43:41 2011
New Revision: 1153218

URL: http://svn.apache.org/viewvc?rev=1153218&view=rev
Log:
spi2microkernel (WIP)
- log

Modified:
    jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java

Modified: jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java?rev=1153218&r1=1153217&r2=1153218&view=diff
==============================================================================
--- jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
(original)
+++ jackrabbit/sandbox/spi2microkernel/src/main/java/org/apache/jackrabbit/spi2microkernel/SubscriptionImpl.java
Tue Aug  2 17:43:41 2011
@@ -259,6 +259,8 @@ public class SubscriptionImpl implements
             List<EventBundle> eventBundles = new ArrayList<EventBundle>();
             try {
                 List<?> jsonArray = jsonArray(new JSONParser().parse(journal));
+                log.debug("getJournal() returned array of length " + jsonArray.size());
+
                 Iterator<?> it = jsonArray.iterator();
                 if (it.hasNext()) {
                     it.next();  // skip base revision
@@ -288,13 +290,16 @@ public class SubscriptionImpl implements
         private EventBundle createEventBundle(JSONObject jsonObject) {
             String revisionId = getString(jsonObject, "id", false);
             String userData = getString(jsonObject, "msg", true);
+            long timeStamp = getLong(jsonObject, "ts");
+            String changes = getString(jsonObject, "changes", false);
+            log.debug("Creating event bundle from changes in revision " + revisionId + "
at " + timeStamp);
+            log.debug("Changes (" + changes.length() + " chars): " + changes.substring(0,
Math.min(changes.length(), 512)));
 
             EventTemplate eventTemplate = new EventTemplate()
-                    .setTimestamp(getLong(jsonObject, "ts"))
+                    .setTimestamp(timeStamp)
                     .setUserId(sessionState.getSessionInfo().getUserID())
                     .setUserData(userData);
 
-            String changes = getString(jsonObject, "changes", false);
             Collection<Event> events = getEvents(changes, eventTemplate);
 
             boolean isLocal = commitLog.contains(revisionId);  // todo performance: this
does a linear search on the list



Mime
View raw message