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.mdsal.dom.spi.shard;
10 import static java.util.Objects.requireNonNull;
12 import com.google.common.annotations.Beta;
13 import java.util.ArrayList;
14 import java.util.Collection;
15 import org.eclipse.jdt.annotation.NonNullByDefault;
16 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
17 import org.opendaylight.yangtools.concepts.Mutable;
20 * Specification of subshard producer context that's used for building modification factories that span into the
21 * subshards. This class is not thread-safe.
23 * @deprecated This interface is scheduled for removal in the next major release.
25 @Deprecated(forRemoval = true)
28 public final class SubshardProducerSpecification implements Mutable {
29 private final Collection<DOMDataTreeIdentifier> prefixes = new ArrayList<>(1);
30 private final ChildShardContext shard;
32 public SubshardProducerSpecification(final ChildShardContext subshard) {
33 this.shard = requireNonNull(subshard);
36 public void addPrefix(final DOMDataTreeIdentifier prefix) {
40 public DOMDataTreeShardProducer createProducer() {
41 return shard.getShard().createProducer(prefixes);
44 public DOMDataTreeIdentifier getPrefix() {
45 return shard.getPrefix();