ed58338bea9fc7148725f3aac3f731959b2ced39
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / sharding / messages / LookupPrefixShard.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 package org.opendaylight.controller.cluster.sharding.messages;
9
10 import static java.util.Objects.requireNonNull;
11
12 import com.google.common.annotations.Beta;
13 import java.io.Serializable;
14 import org.opendaylight.controller.cluster.sharding.ShardedDataTreeActor;
15 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
16
17 /**
18  * Sent to the local {@link ShardedDataTreeActor} when there was a shard created
19  * on the local node. The local actor should notify the remote actors with {@link PrefixShardCreated} which should
20  * create the required frontend/backend shards.
21  */
22 @Beta
23 @Deprecated(forRemoval = true)
24 public class LookupPrefixShard implements Serializable {
25     private static final long serialVersionUID = 1L;
26
27     private final DOMDataTreeIdentifier prefix;
28
29     public LookupPrefixShard(final DOMDataTreeIdentifier prefix) {
30         this.prefix = requireNonNull(prefix);
31     }
32
33     public DOMDataTreeIdentifier getPrefix() {
34         return prefix;
35     }
36
37
38     @Override
39     public String toString() {
40         return "LookupPrefixShard{"
41                 + "prefix="
42                 + prefix
43                 + '}';
44     }
45 }