Basic DistributedDataStoreIntegrationTest added
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / PrimaryNotFound.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 com.google.common.base.Preconditions;
12
13 public class PrimaryNotFound {
14
15     private final String shardName;
16
17     public PrimaryNotFound(String shardName){
18
19         Preconditions.checkNotNull(shardName, "shardName should not be null");
20
21         this.shardName = shardName;
22     }
23
24     @Override
25     public boolean equals(Object o) {
26         if (this == o) return true;
27         if (o == null || getClass() != o.getClass()) return false;
28
29         PrimaryNotFound that = (PrimaryNotFound) o;
30
31         if (shardName != null ? !shardName.equals(that.shardName) : that.shardName != null) return false;
32
33         return true;
34     }
35
36     @Override
37     public int hashCode() {
38         return shardName != null ? shardName.hashCode() : 0;
39     }
40 }