2 * Copyright (c) 2017 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
8 package org.opendaylight.controller.cluster.datastore.messages;
10 import static java.util.Objects.requireNonNull;
12 import org.eclipse.jdt.annotation.NonNull;
13 import org.opendaylight.controller.cluster.access.concepts.MemberName;
14 import org.opendaylight.yangtools.yang.data.api.YangInstanceIdentifier;
17 * A message sent to the ShardManager to dynamically remove a local prefix shard
18 * replica available in this node.
20 public class RemovePrefixShardReplica {
22 private final YangInstanceIdentifier prefix;
23 private final MemberName memberName;
28 * @param prefix prefix of the local shard that is to be dynamically removed.
30 public RemovePrefixShardReplica(final @NonNull YangInstanceIdentifier prefix,
31 final @NonNull MemberName memberName) {
32 this.prefix = requireNonNull(prefix, "prefix should not be null");
33 this.memberName = requireNonNull(memberName, "memberName should not be null");
36 public YangInstanceIdentifier getShardPrefix() {
40 public MemberName getMemberName() {
45 public String toString() {
46 return "RemovePrefixShardReplica [prefix=" + prefix + ", memberName=" + memberName + "]";