BUG 2138: Introduce prefix based shards into ShardManager
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / AddPrefixShardReplica.java
1 /*
2  * Copyright (c) 2016 Cisco Systems, 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 com.google.common.base.Preconditions;
12 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
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 AddPrefixShardReplica {
21
22     private final YangInstanceIdentifier prefix;
23
24     public AddPrefixShardReplica(final YangInstanceIdentifier prefix) {
25         this.prefix = Preconditions.checkNotNull(prefix);
26     }
27
28     public YangInstanceIdentifier getPrefix() {
29         return prefix;
30     }
31
32     @Override
33     public String toString() {
34         return "AddPrefixShardReplica[ShardName=" + prefix + "]";
35     }
36 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.