BUG 2138: Introduce prefix based shards into ShardManager
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / config / PrefixShardConfiguration.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.datastore.config;
10
11 import java.io.Serializable;
12 import java.util.Collection;
13 import org.opendaylight.controller.cluster.access.concepts.MemberName;
14 import org.opendaylight.mdsal.dom.api.DOMDataTreeIdentifier;
15
16 /**
17  * Configuration for prefix based shards.
18  */
19 public class PrefixShardConfiguration implements Serializable {
20     private static final long serialVersionUID = 1L;
21
22     private final DOMDataTreeIdentifier prefix;
23     private final String shardStrategyName;
24     private final Collection<MemberName> shardMemberNames;
25
26     public PrefixShardConfiguration(final DOMDataTreeIdentifier prefix,
27                                     final String shardStrategyName,
28                                     final Collection<MemberName> shardMemberNames) {
29         this.prefix = prefix;
30         this.shardStrategyName = shardStrategyName;
31         this.shardMemberNames = shardMemberNames;
32     }
33
34     public DOMDataTreeIdentifier getPrefix() {
35         return prefix;
36     }
37
38     public String getShardStrategyName() {
39         return shardStrategyName;
40     }
41
42     public Collection<MemberName> getShardMemberNames() {
43         return shardMemberNames;
44     }
45 }

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