BUG-2138: Create DistributedShardFrontend
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / sharding / messages / RemovePrefixShard.java
1 /*
2  * Copyright (c) 2016 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.sharding.messages;
10
11 import com.google.common.base.Preconditions;
12 import org.opendaylight.controller.cluster.sharding.ShardedDataTreeActor;
13 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
14
15 /**
16  * Sent to the local {@link ShardedDataTreeActor} to notify of a shard removal on the local node.
17  * The local actor should update the configuration so that the change is picked up by other CDS Node Agents and
18  * backend ShardManagers.
19  */
20 public class RemovePrefixShard {
21
22     private final DOMDataTreeIdentifier prefix;
23
24     public RemovePrefixShard(final DOMDataTreeIdentifier prefix) {
25
26         this.prefix = Preconditions.checkNotNull(prefix);
27     }
28
29     public DOMDataTreeIdentifier getPrefix() {
30         return prefix;
31     }
32
33     @Override
34     public String toString() {
35         return "RemovePrefixShard{"
36                 + "prefix=" + prefix
37                 + '}';
38     }
39 }

©2013 OpenDaylight, A Linux Foundation Collaborative Project. All Rights Reserved.
OpenDaylight is a registered trademark of The OpenDaylight Project, Inc.
Linux Foundation and OpenDaylight are registered trademarks of the Linux Foundation.
Linux is a registered trademark of Linus Torvalds.