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 com.google.common.annotations.Beta;
11 import java.util.Collection;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
16 public interface DOMDataTreeShardProducer {
18 * Return the collection of tree identifiers to which this producer is bound. This collection
19 * is constant during the lifetime of a producer.
21 * @return Collection of data tree identifiers.
23 @NonNull Collection<DOMDataTreeIdentifier> getPrefixes();
26 * Create a new write transaction for this producer. Any previous transactions need to be closed either via
27 * {@link DOMDataTreeShardWriteTransaction#ready()} or cancelled.
29 * @return A new write transaction
30 * @throws IllegalStateException if a previous transaction has not been closed
32 @NonNull DOMDataTreeShardWriteTransaction createTransaction();