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.messages;
10 import static java.util.Objects.requireNonNull;
12 import java.util.Collection;
13 import java.util.HashSet;
15 import org.eclipse.jdt.annotation.NonNull;
18 * A remote message sent to locate the primary shard.
20 * @author Thomas Pantelis
22 public class RemoteFindPrimary extends FindPrimary {
23 private static final long serialVersionUID = 1L;
25 private final Set<String> visitedAddresses;
27 public RemoteFindPrimary(String shardName, boolean waitUntilReady, @NonNull Collection<String> visitedAddresses) {
28 super(shardName, waitUntilReady);
29 this.visitedAddresses = new HashSet<>(requireNonNull(visitedAddresses));
32 public @NonNull Set<String> getVisitedAddresses() {
33 return visitedAddresses;