f7113ab3eb8352d2d2b252ffd6f41fa770a2fb60
[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 }