Migrate DatastoreContextIntrospectorFactory to OSGi DS
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / ShardDataTreeChangeListenerPublisher.java
1 /*
2  * Copyright (c) 2016 Brocade Communications Systems, Inc. and others.  All rights reserved.
3  *
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
7  */
8 package org.opendaylight.controller.cluster.datastore;
9
10 import java.util.Optional;
11 import java.util.function.Consumer;
12 import org.opendaylight.mdsal.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;
16
17 /**
18  * Interface for a class that generates and publishes notifications for DataTreeChangeListeners.
19  *
20  * @author Thomas Pantelis
21  */
22 interface ShardDataTreeChangeListenerPublisher extends ShardDataTreeNotificationPublisher {
23     void registerTreeChangeListener(YangInstanceIdentifier treeId, DOMDataTreeChangeListener listener,
24             Optional<DataTreeCandidate> initialState,
25             Consumer<ListenerRegistration<DOMDataTreeChangeListener>> onRegistration);
26 }