Remove ListenerNode/ListenerWalker 37/71437/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 26 Apr 2018 19:06:13 +0000 (21:06 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 26 Apr 2018 19:06:49 +0000 (21:06 +0200)
These classes have been deprecated for three years now, remove them.

Change-Id: I3a5af8f0a96b1507b57732f588aa33864ae9c1d5
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/ListenerNode.java [deleted file]
opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/ListenerWalker.java [deleted file]

diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/ListenerNode.java b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/ListenerNode.java
deleted file mode 100644 (file)
index fd16117..0000000
+++ /dev/null
@@ -1,81 +0,0 @@
-/**
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.md.sal.dom.store.impl.tree;
-
-import com.google.common.base.Preconditions;
-import java.util.Collection;
-import java.util.Optional;
-import org.opendaylight.controller.md.sal.dom.store.impl.DataChangeListenerRegistration;
-import org.opendaylight.mdsal.dom.spi.RegistrationTreeNode;
-import org.opendaylight.yangtools.concepts.Identifiable;
-import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier.PathArgument;
-import org.opendaylight.yangtools.yang.data.api.schema.tree.StoreTreeNode;
-
-/**
- * This is a single node within the listener tree. Note that the data returned from
- * and instance of this class is guaranteed to have any relevance or consistency
- * only as long as the {@link ListenerWalker} instance through which it is reached remains
- * unclosed.
- *
- * @author Robert Varga
- *
- * @deprecated Use {@link RegistrationTreeNode} instead.
- */
-@Deprecated
-public class ListenerNode implements StoreTreeNode<ListenerNode>, Identifiable<PathArgument> {
-    final RegistrationTreeNode<DataChangeListenerRegistration<?>> delegate;
-
-    ListenerNode(final RegistrationTreeNode<DataChangeListenerRegistration<?>> delegate) {
-        this.delegate = Preconditions.checkNotNull(delegate);
-    }
-
-    @Override
-    public PathArgument getIdentifier() {
-        return delegate.getIdentifier();
-    }
-
-    @Override
-    public Optional<ListenerNode> getChild(final PathArgument child) {
-        final RegistrationTreeNode<DataChangeListenerRegistration<?>> c = delegate.getExactChild(child);
-        if (c == null) {
-            return Optional.empty();
-        }
-
-        return Optional.of(new ListenerNode(c));
-    }
-
-    /**
-     * Return the list of current listeners. This collection is guaranteed
-     * to be immutable only while the walker, through which this node is
-     * reachable remains unclosed.
-     *
-     * @return the list of current listeners
-     */
-    public Collection<DataChangeListenerRegistration<?>> getListeners() {
-        return delegate.getRegistrations();
-    }
-
-    @Override
-    public int hashCode() {
-        return delegate.hashCode();
-    }
-
-    @Override
-    public boolean equals(final Object obj) {
-        if (obj == null || getClass() != obj.getClass()) {
-            return false;
-        }
-
-        return delegate.equals(((ListenerNode)obj).delegate);
-    }
-
-    @Override
-    public String toString() {
-        return delegate.toString();
-    }
-}
diff --git a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/ListenerWalker.java b/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/ListenerWalker.java
deleted file mode 100644 (file)
index 7b8add9..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-/**
- * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
- *
- * This program and the accompanying materials are made available under the
- * terms of the Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at http://www.eclipse.org/legal/epl-v10.html
- */
-package org.opendaylight.controller.md.sal.dom.store.impl.tree;
-
-import com.google.common.base.Preconditions;
-import org.opendaylight.controller.md.sal.dom.store.impl.DataChangeListenerRegistration;
-import org.opendaylight.mdsal.dom.spi.RegistrationTreeSnapshot;
-
-/**
- * A walking context, pretty much equivalent to an iterator, but it
- * exposes the underlying tree structure.
- *
- * @author Robert Varga
- *
- * @deprecated Superseded by {@link RegistrationTreeSnapshot}.
- */
-@Deprecated
-public class ListenerWalker implements AutoCloseable {
-    private final RegistrationTreeSnapshot<DataChangeListenerRegistration<?>> delegate;
-
-    ListenerWalker(final RegistrationTreeSnapshot<DataChangeListenerRegistration<?>> delegate) {
-        this.delegate = Preconditions.checkNotNull(delegate);
-    }
-
-    public ListenerNode getRootNode() {
-        return new ListenerNode(delegate.getRootNode());
-    }
-
-    @Override
-    public void close() {
-        delegate.close();
-    }
-}
\ No newline at end of file

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.