2 * Copyright (c) 2016 Brocade Communications 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.cluster.datastore;
10 import com.google.common.base.Optional;
11 import java.util.function.Consumer;
12 import org.opendaylight.controller.md.sal.dom.api.DOMDataTreeChangeListener;
13 import org.opendaylight.yangtools.concepts.ListenerRegistration;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
15 import org.opendaylight.yangtools.yang.data.api.schema.tree.DataTreeCandidate;
18 * Interface for a class that generates and publishes notifications for DataTreeChangeListeners.
20 * @author Thomas Pantelis
22 interface ShardDataTreeChangeListenerPublisher extends ShardDataTreeNotificationPublisher {
23 void registerTreeChangeListener(YangInstanceIdentifier treeId, DOMDataTreeChangeListener listener,
24 Optional<DataTreeCandidate> initialState,
25 Consumer<ListenerRegistration<DOMDataTreeChangeListener>> onRegistration);