+++ /dev/null
-/*
- * Copyright (c) 2017 Pantheon Technologies s.r.o. 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.mdsal.binding.javav2.api;
-
-import com.google.common.annotations.Beta;
-import java.util.Collection;
-import java.util.EventListener;
-import java.util.Map;
-import javax.annotation.Nonnull;
-import org.opendaylight.mdsal.binding.javav2.spec.base.TreeNode;
-
-/**
- * Interface implemented by data consumers, e.g. processes wanting to act on data after it has been
- * introduced to the conceptual data tree.
- */
-@Beta
-public interface DataTreeListener extends EventListener {
-
- /**
- * Invoked whenever one or more registered subtrees change. The logical changes are reported, as
- * well as the roll up of new state for all subscribed subtrees.
- *
- * @param changes The set of changes being reported. Each subscribed subtree may be present at
- * most once.
- * @param subtrees Per-subtree state as visible after the reported changes have been applied.
- * This includes all the subtrees this listener is subscribed to, even those which have
- * not changed.
- */
- void onDataTreeChanged(@Nonnull Collection<DataTreeModification<?>> changes,
- @Nonnull Map<DataTreeIdentifier<?>, TreeNode> subtrees);
-
- /**
- * Invoked when a subtree listening failure occurs. This can be triggered, for example, when a
- * connection to external subtree source is broken. The listener will not receive any other
- * callbacks, but its registration still needs to be closed to prevent resource leak.
- *
- * @param causes Collection of failure causes, may not be null or empty.
- */
- void onDataTreeFailed(@Nonnull Collection<DataTreeListeningException> causes);
-}