jackrabbit-oak-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mdue...@apache.org
Subject svn commit: r1436838 - /jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ObservationManagerImpl.java
Date Tue, 22 Jan 2013 11:32:59 GMT
Author: mduerig
Date: Tue Jan 22 11:32:59 2013
New Revision: 1436838

URL: http://svn.apache.org/viewvc?rev=1436838&view=rev
Log:
OAK-144 Implement observation
- implement support for node type filtering: simplify

Modified:
    jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ObservationManagerImpl.java

Modified: jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ObservationManagerImpl.java
URL: http://svn.apache.org/viewvc/jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ObservationManagerImpl.java?rev=1436838&r1=1436837&r2=1436838&view=diff
==============================================================================
--- jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ObservationManagerImpl.java
(original)
+++ jackrabbit/oak/trunk/oak-core/src/main/java/org/apache/jackrabbit/oak/plugins/observation/ObservationManagerImpl.java
Tue Jan 22 11:32:59 2013
@@ -21,7 +21,6 @@ import java.util.Map;
 import java.util.concurrent.ScheduledExecutorService;
 import java.util.concurrent.atomic.AtomicBoolean;
 
-import javax.annotation.Nonnull;
 import javax.jcr.RepositoryException;
 import javax.jcr.UnsupportedRepositoryOperationException;
 import javax.jcr.observation.EventJournal;
@@ -32,10 +31,8 @@ import javax.jcr.observation.Observation
 import com.google.common.base.Preconditions;
 import org.apache.jackrabbit.commons.iterator.EventListenerIteratorAdapter;
 import org.apache.jackrabbit.oak.api.Root;
-import org.apache.jackrabbit.oak.api.Tree;
 import org.apache.jackrabbit.oak.core.RootImpl;
 import org.apache.jackrabbit.oak.namepath.NamePathMapper;
-import org.apache.jackrabbit.oak.plugins.nodetype.NodeTypeConstants;
 import org.apache.jackrabbit.oak.plugins.nodetype.ReadOnlyNodeTypeManager;
 import org.apache.jackrabbit.oak.spi.observation.ChangeExtractor;
 
@@ -55,7 +52,7 @@ public class ObservationManagerImpl impl
         this.root = ((RootImpl) root);
         this.namePathMapper = namePathMapper;
         this.executor = executor;
-        this.ntMgr = new NTMgr();
+        this.ntMgr = ReadOnlyNodeTypeManager.getInstance(root, namePathMapper);
     }
 
     public synchronized void dispose() {
@@ -132,18 +129,4 @@ public class ObservationManagerImpl impl
     void setHasEvents() {
         hasEvents.set(true);
     }
-
-    private final class NTMgr extends ReadOnlyNodeTypeManager {
-
-        @Override
-        protected Tree getTypes() {
-            return root.getTree(NodeTypeConstants.NODE_TYPES_PATH);
-        }
-
-        @Nonnull
-        @Override
-        protected NamePathMapper getNamePathMapper() {
-            return namePathMapper;
-        }
-    }
 }



Mime
View raw message