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 static java.util.Objects.requireNonNull;
12 import com.google.common.collect.ImmutableSet;
13 import java.util.Collection;
15 import org.eclipse.jdt.annotation.NonNull;
16 import org.opendaylight.controller.cluster.access.concepts.MemberName;
19 * Encapsulated configuration for a shard.
21 public class ShardConfig {
22 private final String name;
23 private final Set<MemberName> replicas;
25 public ShardConfig(final @NonNull String name, final @NonNull Collection<MemberName> replicas) {
26 this.name = requireNonNull(name);
27 this.replicas = ImmutableSet.copyOf(replicas);
30 public @NonNull String getName() {
34 public @NonNull Set<MemberName> getReplicas() {