BUG-8733: Add ListenableDOMDataTreeShard
[mdsal.git] / dom / mdsal-dom-spi / src / main / java / org / opendaylight / mdsal / dom / spi / shard / DOMDataTreeListenerRegistry.java
1 /*
2  * Copyright (c) 2017 Pantheon Technologies, s.ro. 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.mdsal.dom.spi.shard;
9
10 import com.google.common.annotations.Beta;
11 import java.util.Collection;
12 import javax.annotation.Nonnull;
13 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
14 import org.opendaylight.mdsal.dom.api.DOMDataTreeListener;
15 import org.opendaylight.yangtools.concepts.ListenerRegistration;
16
17 /**
18  * Utility interface for objects dispatching events to {@link DOMDataTreeListener}.
19  *
20  * @author Robert Varga
21  */
22 @Beta
23 public interface DOMDataTreeListenerRegistry {
24
25     @Nonnull <T extends DOMDataTreeListener> ListenerRegistration<T> registerListener(@Nonnull T listener,
26             @Nonnull Collection<DOMDataTreeIdentifier> subtrees, boolean allowRxMerges);
27 }