Use ImmutableMap instead of Collections.emptyMap()
[mdsal.git] / dom / mdsal-dom-inmemory-datastore / src / main / java / org / opendaylight / mdsal / dom / store / inmemory / DOMDataTreeShardProducer.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
9 package org.opendaylight.mdsal.dom.store.inmemory;
10
11 import com.google.common.annotations.Beta;
12 import java.util.Collection;
13 import javax.annotation.Nonnull;
14 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
15
16 // FIXME: this should probably be moved to a different package
17 @Beta
18 public interface DOMDataTreeShardProducer {
19     /**
20      * Return the collection of tree identifiers to which this producer is bound. This collection
21      * is constant during the lifetime of a producer.
22      *
23      * @return Collection of data tree identifiers.
24      */
25     @Nonnull Collection<DOMDataTreeIdentifier> getPrefixes();
26
27     /**
28      * Create a new write transaction for this producer. Any previous transactions need to be closed either via
29      * {@link DOMDataTreeShardWriteTransaction#ready()} or cancelled.
30      *
31      * @return A new write transaction
32      * @throws IllegalStateException if a previous transaction has not been closed
33      */
34     DOMDataTreeShardWriteTransaction createTransaction();
35 }