2 * Copyright (c) 2015 Brocade Communications Systems, Inc. and others. All rights reserved.
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
8 package org.opendaylight.controller.cluster.datastore.config;
10 import com.google.common.base.Preconditions;
11 import com.google.common.collect.ImmutableSet;
12 import java.util.Collection;
14 import javax.annotation.Nonnull;
15 import org.opendaylight.controller.cluster.access.concepts.MemberName;
18 * Encapsulated configuration for a shard.
20 public class ShardConfig {
21 private final String name;
22 private final Set<MemberName> replicas;
24 public ShardConfig(@Nonnull final String name, @Nonnull final Collection<MemberName> replicas) {
25 this.name = Preconditions.checkNotNull(name);
26 this.replicas = ImmutableSet.copyOf(Preconditions.checkNotNull(replicas));
30 public String getName() {
35 public Set<MemberName> getReplicas() {