2 * Copyright (c) 2023 PANTHEON.tech, s.r.o. 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.mdsal.binding.api;
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.Nullable;
12 import org.opendaylight.yangtools.yang.binding.DataObject;
15 * Interface implemented by classes interested in receiving data changes.
16 * It provides a comparison on before-value and after-value.
20 public interface DataChangeListener<T extends DataObject> {
22 * Invoked when there was data change for the supplied path, which was used
23 * to register the listener.
26 * Note: When invoking the method {@link DataTreeChangeListener#onInitialData} initial data == null, null.
27 * @param previousValue data before.
28 * @param currentValue data after.
30 void dataChanged(@Nullable T previousValue, @Nullable T currentValue);