BUG 2187 - Persisting shard list in ShardManager
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / config / Configuration.java
index 21801c0102912f95fd6e3b29617c29cd86304c11..b6122b3d29f4f07eada831feaa5765c3a073047f 100644 (file)
@@ -22,7 +22,7 @@ public interface Configuration {
     @Nonnull Collection<String> getMemberShardNames(@Nonnull String memberName);
 
     /**
-     * Returns the namespace for the given module name or null if not found.
+     * Returns the module name for the given namespace name or null if not found.
      */
     @Nullable String getModuleNameFromNameSpace(@Nonnull String nameSpace);
 
@@ -55,4 +55,19 @@ public interface Configuration {
      * Returns a unique set of all member names configured for all shards.
      */
     Collection<String> getUniqueMemberNamesForAllShards();
+
+    /*
+     * Verifies if the given module shard in available in the cluster
+     */
+    boolean isShardConfigured(String shardName);
+
+    /**
+     * Adds the given member as the new replica for the given shardName
+     */
+    void addMemberReplicaForShard (String shardName, String memberName);
+
+    /**
+     * Removes the given member as a replica for the given shardName
+     */
+    void removeMemberReplicaForShard (String shardName, String memberName);
 }