2 * Copyright (c) 2016 Cisco 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.dom.api;
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;
16 * An extension to {@link DOMDataTreeProducer}, which allows users access
17 * to information about the backing shard.
19 * @author Robert Varga
22 @Deprecated(forRemoval = true)
23 public interface CDSDataTreeProducer extends DOMDataTreeProducer {
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.
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.
39 @NonNull CDSShardAccess getShardAccess(@NonNull DOMDataTreeIdentifier subtree);