Deprecate DOMDataTreeProducer-related classes
[controller.git] / opendaylight / md-sal / cds-dom-api / src / main / java / org / opendaylight / controller / cluster / dom / api / CDSDataTreeProducer.java
1 /*
2  * Copyright (c) 2016 Cisco 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.dom.api;
9
10 import com.google.common.annotations.Beta;
11 import org.eclipse.jdt.annotation.NonNull;
12 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
13 import org.opendaylight.mdsal.dom.api.DOMDataTreeProducer;
14
15 /**
16  * An extension to {@link DOMDataTreeProducer}, which allows users access
17  * to information about the backing shard.
18  *
19  * @author Robert Varga
20  */
21 @Beta
22 @Deprecated(forRemoval = true)
23 public interface CDSDataTreeProducer extends DOMDataTreeProducer {
24     /**
25      * Return a {@link CDSShardAccess} handle. This handle will remain valid
26      * as long as this producer is operational. Returned handle can be accessed
27      * independently from this producer and is not subject to the usual access
28      * restrictions imposed on DOMDataTreeProducer state.
29      *
30      * @param subtree One of the subtrees to which are currently under control of this producer
31      * @return A shard access handle.
32      * @throws NullPointerException when subtree is null
33      * @throws IllegalArgumentException if the specified subtree is not controlled by this producer
34      * @throws IllegalStateException if this producer is no longer operational
35      * @throws IllegalThreadStateException if the access rules to this producer
36      *         are violated, for example if this producer is bound and this thread
37      *         is currently not executing from a listener context.
38      */
39     @NonNull CDSShardAccess getShardAccess(@NonNull DOMDataTreeIdentifier subtree);
40 }
41