BUG-5280: remove support for talking to pre-Boron clients
[controller.git] / opendaylight / md-sal / sal-distributed-datastore / src / main / java / org / opendaylight / controller / cluster / datastore / messages / RemoteFindPrimary.java
1 /*
2  * Copyright (c) 2015 Brocade Communications 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 package org.opendaylight.controller.cluster.datastore.messages;
9
10 import com.google.common.base.Preconditions;
11 import java.util.Collection;
12 import java.util.HashSet;
13 import java.util.Set;
14 import javax.annotation.Nonnull;
15
16 /**
17  * A remote message sent to locate the primary shard.
18  *
19  * @author Thomas Pantelis
20  */
21 public class RemoteFindPrimary extends FindPrimary {
22     private static final long serialVersionUID = 1L;
23
24     private final Set<String> visitedAddresses;
25
26     public RemoteFindPrimary(String shardName, boolean waitUntilReady, @Nonnull Collection<String> visitedAddresses) {
27         super(shardName, waitUntilReady);
28         this.visitedAddresses = new HashSet<>(Preconditions.checkNotNull(visitedAddresses));
29     }
30
31     @Nonnull
32     public Set<String> getVisitedAddresses() {
33         return visitedAddresses;
34     }
35 }