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.identifiers;
11 public class ShardManagerIdentifier {
12 private final String type;
14 public ShardManagerIdentifier(String type) {
19 public boolean equals(Object o) {
23 if (o == null || getClass() != o.getClass()) {
27 ShardManagerIdentifier that = (ShardManagerIdentifier) o;
29 if (!type.equals(that.type)) {
37 public int hashCode() {
38 return type.hashCode();
41 @Override public String toString() {
42 StringBuilder builder = new StringBuilder();
43 builder.append("shardmanager-").append(type);
44 return builder.toString();
47 public static Builder builder(){
51 public static class Builder {
54 public Builder type(String type){
59 public ShardManagerIdentifier build(){
60 return new ShardManagerIdentifier(this.type);