jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ju...@apache.org
Subject svn commit: r1557204 - in /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation: ChangeProcessor.java EventIterable.java EventIterator.java JcrListener.java
Date Fri, 10 Jan 2014 17:49:20 GMT
Author: jukka
Date: Fri Jan 10 17:49:20 2014
New Revision: 1557204

URL: http://svn.apache.org/r1557204
Log:
OAK-1318: EventIterator keeps references to already seen events

Rename EventIterator to EventIterable to match the interface it implements

Added:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterable.java
      - copied, changed from r1557203, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterator.java
Removed:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterator.java
Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/JcrListener.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java?rev=1557204&r1=1557203&r2=1557204&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ChangeProcessor.java
Fri Jan 10 17:49:20 2014
@@ -163,7 +163,7 @@ public class ChangeProcessor implements 
                     EventFilter acFilter = new ACFilter(previousRoot, root, permissionProvider,
basePath);
                     ImmutableTree beforeTree = getTree(previousRoot, basePath);
                     ImmutableTree afterTree = getTree(root, basePath);
-                    EventIterator<Event> events = new EventIterator<Event>(
+                    EventIterable<Event> events = new EventIterable<Event>(
                             beforeTree.getNodeState(), afterTree.getNodeState(),
                             Filters.all(userFilter, acFilter),
                             new JcrListener(beforeTree, afterTree, namePathMapper, info));

Copied: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterable.java
(from r1557203, jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterator.java)
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterable.java?p2=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterable.java&p1=jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterator.java&r1=1557203&r2=1557204&rev=1557204&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterator.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/EventIterable.java
Fri Jan 10 17:49:20 2014
@@ -41,8 +41,8 @@ import org.slf4j.LoggerFactory;
  * events.
  * @param <T> type of the event returned by this iterator
  */
-public class EventIterator<T> extends EventGenerator implements Iterable<T> {
-    private static final Logger LOG = LoggerFactory.getLogger(EventIterator.class);
+public class EventIterable<T> extends EventGenerator implements Iterable<T> {
+    private static final Logger LOG = LoggerFactory.getLogger(EventIterable.class);
 
     private final NodeState before;
     private final NodeState after;
@@ -50,7 +50,7 @@ public class EventIterator<T> extends Ev
     private final EventFilter filter;
     private final IterableListener<T> listener;
 
-    private final LinkedList<EventIterator<T>> childEvents = newLinkedList();
+    private final LinkedList<EventIterable<T>> childEvents = newLinkedList();
 
     /**
      * Specialisation of {@link Listener} that provides the events reported
@@ -73,7 +73,7 @@ public class EventIterator<T> extends Ev
      * @param filter  filter for filtering changes
      * @param listener  listener for listening to the filtered changes
      */
-    public EventIterator(@Nonnull NodeState before, @Nonnull NodeState after,
+    public EventIterable(@Nonnull NodeState before, @Nonnull NodeState after,
             @Nonnull EventFilter filter, @Nonnull IterableListener<T> listener) {
         super(filter, listener);
         this.before = checkNotNull(before);
@@ -88,7 +88,7 @@ public class EventIterator<T> extends Ev
     protected EventGenerator createChildGenerator(String name, NodeState before, NodeState
after) {
         EventFilter childFilter = filter.create(name, before, after);
         if (childFilter != null) {
-            childEvents.add(new EventIterator<T>(
+            childEvents.add(new EventIterable<T>(
                     before, after,
                     childFilter,
                     listener.create(name, before, after)));

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/JcrListener.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/JcrListener.java?rev=1557204&r1=1557203&r2=1557204&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/JcrListener.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/JcrListener.java
Fri Jan 10 17:49:20 2014
@@ -40,7 +40,7 @@ import org.apache.jackrabbit.oak.api.Pro
 import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.commons.PathUtils;
 import org.apache.jackrabbit.oak.namepath.PathMapper;
-import org.apache.jackrabbit.oak.plugins.observation.EventIterator.IterableListener;
+import org.apache.jackrabbit.oak.plugins.observation.EventIterable.IterableListener;
 import org.apache.jackrabbit.oak.spi.commit.CommitInfo;
 import org.apache.jackrabbit.oak.spi.state.NodeState;
 



Mime
View raw message