2 * Copyright (c) 2015 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.md.sal.dom.api;
10 import java.util.Collection;
11 import java.util.EventListener;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
16 * Interface implemented by classes interested in receiving notifications about
17 * data tree changes. This interface differs from {@link DOMDataChangeListener}
18 * in that it provides a cursor-based view of the change, which has potentially
21 public interface DOMDataTreeChangeListener extends EventListener {
23 * Invoked when there was data change for the supplied path, which was used
24 * to register this listener.
27 * This method may be also invoked during registration of the listener if
28 * there is any pre-existing data in the conceptual data tree for supplied
29 * path. This initial event will contain all pre-existing data as created.
32 * A data change event may be triggered spuriously, e.g. such that data before
33 * and after compare as equal. Implementations of this interface are expected
34 * to recover from such events. Event producers are expected to exert reasonable
35 * effort to suppress such events.
37 * In other words, it is completely acceptable to observe
38 * a {@link org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidateNode},
39 * which reports a {@link org.opendaylight.yangtools.yang.data.api.schema.tree.ModificationType}
40 * other than UNMODIFIED, while the before- and after- data items compare as
43 * @param changes Collection of change events, may not be null or empty.
45 void onDataTreeChanged(@Nonnull Collection<DataTreeCandidate> changes);