2 * Copyright (c) 2014 Cisco Systems, Inc. and others. All rights reserved.
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
9 package org.opendaylight.controller.cluster.datastore.messages;
11 import com.google.common.base.Preconditions;
14 * The FindPrimary message is used to locate the primary of any given shard
17 public class FindPrimary implements SerializableMessage{
18 public static final Class SERIALIZABLE_CLASS = FindPrimary.class;
19 private final String shardName;
21 public FindPrimary(String shardName){
23 Preconditions.checkNotNull(shardName, "shardName should not be null");
25 this.shardName = shardName;
28 public String getShardName() {
33 public Object toSerializable() {
37 public static FindPrimary fromSerializable(Object message){
38 return (FindPrimary) message;