Bug 4105: Add method to get all unique member names
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / Configuration.java
index 1c3a82a7904a962aebfd101c2ea96701a84830d8..c57d2d4733c7e1a6838d137d0a3176da987dabe3 100644 (file)
@@ -9,14 +9,59 @@
 package org.opendaylight.controller.cluster.datastore;
 
 import com.google.common.base.Optional;
-import org.opendaylight.controller.cluster.datastore.shardstrategy.ShardStrategy;
-
+import java.util.Collection;
 import java.util.List;
 import java.util.Map;
+import java.util.Set;
+import org.opendaylight.controller.cluster.datastore.shardstrategy.ShardStrategy;
 
 public interface Configuration {
+
+    /**
+     * Given a memberName find all the shards that belong on that member and
+     * return the names of those shards
+     *
+     * @param memberName
+     * @return
+     */
     List<String> getMemberShardNames(String memberName);
+
+    /**
+     * Given a module namespace return the name of a module
+     * @param nameSpace
+     * @return
+     */
     Optional<String> getModuleNameFromNameSpace(String nameSpace);
+
+    /**
+     * Get a mapping of the module names to it's corresponding ShardStrategy
+     * @return
+     */
     Map<String, ShardStrategy> getModuleNameToShardStrategyMap();
+
+    /**
+     * Given a module name find all the shardNames corresponding to it
+     * @param moduleName
+     * @return
+     */
     List<String> getShardNamesFromModuleName(String moduleName);
+
+    /**
+     * Given a shardName find all the members on which it belongs
+     *
+     * @param shardName
+     * @return
+     */
+    List<String> getMembersFromShardName(String shardName);
+
+    /**
+     *
+     * @return
+     */
+    Set<String> getAllShardNames();
+
+    /**
+     * Returns a unique set of all member names configured for all shards.
+     */
+    Collection<String> getUniqueMemberNamesForAllShards();
 }