Fix checkstyle violations in sal-inmemory-datastore
[controller.git] / opendaylight / md-sal / sal-inmemory-datastore / src / main / java / org / opendaylight / controller / md / sal / dom / store / impl / tree / ListenerTree.java
index c0ad313291892b8873ee903b7de80def2f310bb5..a67040e9290c044b84f94b76ebfd456737cb92a9 100644 (file)
@@ -9,9 +9,9 @@ package org.opendaylight.controller.md.sal.dom.store.impl.tree;
 
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataBroker.DataChangeScope;
 import org.opendaylight.controller.md.sal.common.api.data.AsyncDataChangeListener;
-import org.opendaylight.controller.md.sal.dom.spi.AbstractRegistrationTree;
-import org.opendaylight.controller.md.sal.dom.spi.RegistrationTreeNode;
 import org.opendaylight.controller.md.sal.dom.store.impl.DataChangeListenerRegistration;
+import org.opendaylight.mdsal.dom.spi.AbstractRegistrationTree;
+import org.opendaylight.mdsal.dom.spi.RegistrationTreeNode;
 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
 import org.opendaylight.yangtools.yang.data.api.schema.NormalizedNode;
 
@@ -43,8 +43,9 @@ public final class ListenerTree extends AbstractRegistrationTree<DataChangeListe
      * @param scope Scope of triggering event.
      * @return Listener registration
      */
-    public <L extends AsyncDataChangeListener<YangInstanceIdentifier, NormalizedNode<?, ?>>> DataChangeListenerRegistration<L> registerDataChangeListener(final YangInstanceIdentifier path,
-            final L listener, final DataChangeScope scope) {
+    public <L extends AsyncDataChangeListener<YangInstanceIdentifier, NormalizedNode<?, ?>>>
+            DataChangeListenerRegistration<L> registerDataChangeListener(final YangInstanceIdentifier path,
+                final L listener, final DataChangeScope scope) {
 
         // Take the write lock
         takeLock();
@@ -84,27 +85,4 @@ public final class ListenerTree extends AbstractRegistrationTree<DataChangeListe
             releaseLock();
         }
     }
-
-    /**
-     * Obtain a tree walking context. This context ensures a consistent view of
-     * the listener registrations. The context should be closed as soon as it
-     * is not required, because each unclosed instance blocks modification of
-     * the listener tree.
-     *
-     * @return A walker instance.
-     *
-     * @deprecated Use {@link #takeSnapshot()} instead.
-     */
-    @Deprecated
-    public ListenerWalker getWalker() {
-        /*
-         * TODO: The only current user of this method is local to the datastore.
-         *       Since this class represents a read-lock, losing a reference to
-         *       it is a _major_ problem, as the registration process will get
-         *       wedged, eventually grinding the system to a halt. Should an
-         *       external user exist, make the Walker a phantom reference, which
-         *       will cleanup the lock if not told to do so.
-         */
-        return new ListenerWalker(takeSnapshot());
-    }
 }