7e0a4f685ed032200216ee50d41e4083577ba7ca
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / sharding / messages / PrefixShardCreated.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.annotations.Beta;
12 import org.opendaylight.controller.cluster.datastore.config.PrefixShardConfiguration;
13 import org.opendaylight.controller.cluster.sharding.ShardedDataTreeActor;
14
15 /**
16  * Message sent to the local {@link ShardedDataTreeActor} when a clustered
17  * shard was created locally. The backend shards/replicas will be handled by the ShardManager but the
18  * {@link ShardedDataTreeActor} needs to handle the registration of the
19  * frontends into the {@link org.opendaylight.mdsal.dom.api.DOMDataTreeShardingService}. The configuration only contains
20  * the Member nodes that this is still yet to be distributed to. The last node will receive PrefixShardConfiguration
21  * with only it's member present.
22  */
23 @Beta
24 @Deprecated(forRemoval = true)
25 public class PrefixShardCreated {
26     private final PrefixShardConfiguration configuration;
27
28     public PrefixShardCreated(final PrefixShardConfiguration configuration) {
29         this.configuration = configuration;
30     }
31
32     public PrefixShardConfiguration getConfiguration() {
33         return configuration;
34     }
35
36     @Override
37     public String toString() {
38         return "PrefixShardCreated{"
39                 + "configuration=" + configuration
40                 + '}';
41     }
42 }