BUG-2138: Create DistributedShardFrontend
[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 public class PrefixShardCreated {
25     private final PrefixShardConfiguration configuration;
26
27     public PrefixShardCreated(final PrefixShardConfiguration configuration) {
28         this.configuration = configuration;
29     }
30
31     public PrefixShardConfiguration getConfiguration() {
32         return configuration;
33     }
34
35     @Override
36     public String toString() {
37         return "PrefixShardCreated{"
38                 + "configuration=" + configuration
39                 + '}';
40     }
41 }

©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.