BUG-5280: remove support for talking to pre-Boron clients
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / AddShardReplica.java
1 /*
2  * Copyright (c) 2015 Dell 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.messages;
10
11 import javax.annotation.Nonnull;
12 import com.google.common.base.Preconditions;
13
14 /**
15  * A message sent to the ShardManager to dynamically add a new local shard
16  *  that is a replica for an existing shard that is already available in the
17  *  cluster.
18  */
19
20 public class AddShardReplica {
21
22     private final String shardName;
23
24     /**
25      * Constructor.
26      *
27      * @param shardName name of the shard that is to be locally replicated.
28      */
29
30     public AddShardReplica (@Nonnull String shardName){
31         this.shardName = Preconditions.checkNotNull(shardName, "ShardName should not be null");
32     }
33
34     public String getShardName(){
35         return this.shardName;
36     }
37
38     @Override
39     public String toString(){
40         return "AddShardReplica[ShardName=" + shardName + "]";
41     }
42 }