Merge "Bug 2820 - LLDP TLV support and testing"
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / Configuration.java
1 /*
2  * Copyright (c) 2014 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.controller.cluster.datastore;
10
11 import com.google.common.base.Optional;
12 import org.opendaylight.controller.cluster.datastore.shardstrategy.ShardStrategy;
13
14 import java.util.List;
15 import java.util.Map;
16 import java.util.Set;
17
18 public interface Configuration {
19
20     /**
21      * Given a memberName find all the shards that belong on that member and
22      * return the names of those shards
23      *
24      * @param memberName
25      * @return
26      */
27     List<String> getMemberShardNames(String memberName);
28
29     /**
30      * Given a module namespace return the name of a module
31      * @param nameSpace
32      * @return
33      */
34     Optional<String> getModuleNameFromNameSpace(String nameSpace);
35
36     /**
37      * Get a mapping of the module names to it's corresponding ShardStrategy
38      * @return
39      */
40     Map<String, ShardStrategy> getModuleNameToShardStrategyMap();
41
42     /**
43      * Given a module name find all the shardNames corresponding to it
44      * @param moduleName
45      * @return
46      */
47     List<String> getShardNamesFromModuleName(String moduleName);
48
49     /**
50      * Given a shardName find all the members on which it belongs
51      *
52      * @param shardName
53      * @return
54      */
55     List<String> getMembersFromShardName(String shardName);
56
57     /**
58      *
59      * @return
60      */
61     Set<String> getAllShardNames();
62 }