X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fmd-sal%2Fsal-inmemory-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2Ftree%2FListenerNode.java;fp=opendaylight%2Fmd-sal%2Fsal-inmemory-datastore%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fcontroller%2Fmd%2Fsal%2Fdom%2Fstore%2Fimpl%2Ftree%2FListenerNode.java;h=0000000000000000000000000000000000000000;hb=5910654aedb5f629faa13e9be41cbf1155b0090f;hp=fd16117cde7d139e02fa03ab88cfd3c9aec29661;hpb=0c14c338ac0592d2e98aa269b42934e45242995e;p=controller.git 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 index fd16117cde..0000000000 --- a/opendaylight/md-sal/sal-inmemory-datastore/src/main/java/org/opendaylight/controller/md/sal/dom/store/impl/tree/ListenerNode.java +++ /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, Identifiable { - final RegistrationTreeNode> delegate; - - ListenerNode(final RegistrationTreeNode> delegate) { - this.delegate = Preconditions.checkNotNull(delegate); - } - - @Override - public PathArgument getIdentifier() { - return delegate.getIdentifier(); - } - - @Override - public Optional getChild(final PathArgument child) { - final RegistrationTreeNode> 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> 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(); - } -}