String performance and maintenability
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / RemotePrimaryShardFound.java
1 /*
2  * Copyright (c) 2014 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 java.io.Serializable;
12
13 /**
14  * Local or remote message sent in reply to FindPrimaryShard to indicate the primary shard is remote to the caller.
15  */
16 public class RemotePrimaryShardFound implements Serializable {
17     private static final long serialVersionUID = 1L;
18
19     private final String primaryPath;
20     private final short primaryVersion;
21
22     public RemotePrimaryShardFound(final String primaryPath, short primaryVersion) {
23         this.primaryPath = primaryPath;
24         this.primaryVersion = primaryVersion;
25     }
26
27     public String getPrimaryPath() {
28         return primaryPath;
29     }
30
31     public short getPrimaryVersion() {
32         return primaryVersion;
33     }
34
35     @Override
36     public String toString() {
37         return "RemotePrimaryShardFound [primaryPath=" + primaryPath
38                 + ", primaryVersion=" + primaryVersion + "]";
39     }
40 }