BUG-5280: fix compilation after unrebased merge
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / config / Configuration.java
index 21801c0102912f95fd6e3b29617c29cd86304c11..fa823a7285cab11db22b9f8685d30ccd2fbd91f4 100644 (file)
@@ -12,6 +12,7 @@ import java.util.Collection;
 import java.util.Set;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
+import org.opendaylight.controller.cluster.access.concepts.MemberName;
 import org.opendaylight.controller.cluster.datastore.shardstrategy.ShardStrategy;
 
 public interface Configuration {
@@ -19,10 +20,10 @@ public interface Configuration {
     /**
      * Returns all the shard names that belong on the member by the given name.
      */
-    @Nonnull Collection<String> getMemberShardNames(@Nonnull String memberName);
+    @Nonnull Collection<String> getMemberShardNames(@Nonnull MemberName 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);
 
@@ -34,7 +35,7 @@ public interface Configuration {
     /**
      * Returns the member replicas for the given shard name.
      */
-    @Nonnull Collection<String> getMembersFromShardName(@Nonnull String shardName);
+    @Nonnull Collection<MemberName> getMembersFromShardName(@Nonnull String shardName);
 
     /**
      * Returns the ShardStrategy for the given module name or null if the module is not found.
@@ -54,5 +55,20 @@ public interface Configuration {
     /**
      * Returns a unique set of all member names configured for all shards.
      */
-    Collection<String> getUniqueMemberNamesForAllShards();
+    Collection<MemberName> 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, MemberName memberName);
+
+    /**
+     * Removes the given member as a replica for the given shardName
+     */
+    void removeMemberReplicaForShard (String shardName, MemberName memberName);
 }