* terms of the Eclipse Public License v1.0 which accompanies this distribution,
* and is available at http://www.eclipse.org/legal/epl-v10.html
*/
-
package org.opendaylight.controller.cluster.datastore.messages;
-import com.google.common.base.Preconditions;
-import javax.annotation.Nonnull;
+import static java.util.Objects.requireNonNull;
+
+import org.eclipse.jdt.annotation.NonNull;
+import org.opendaylight.controller.cluster.access.concepts.MemberName;
/**
* A message sent to the ShardManager to dynamically remove a local shard
public class RemoveShardReplica {
private final String shardName;
- private final String memberName;
+ private final MemberName memberName;
/**
* Constructor.
*
* @param shardName name of the local shard that is to be dynamically removed.
*/
- public RemoveShardReplica (@Nonnull String shardName, @Nonnull String memberName) {
- this.shardName = Preconditions.checkNotNull(shardName, "shardName should not be null");
- this.memberName = Preconditions.checkNotNull(memberName, "memberName should not be null");
+ public RemoveShardReplica(@NonNull String shardName, @NonNull MemberName memberName) {
+ this.shardName = requireNonNull(shardName, "shardName should not be null");
+ this.memberName = requireNonNull(memberName, "memberName should not be null");
}
- public String getShardName(){
+ public String getShardName() {
return shardName;
}
- public String getMemberName() {
+ public MemberName getMemberName() {
return memberName;
}