blob: 0fa235709f9dcd1f5a0374f4171f1648ad75c3ff (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.federation.http;
import java.util.ArrayList;
import java.util.List;
import com.yahoo.search.federation.ProviderConfig;
/**
* Some static helper classes for configured*Searcher classes
*
* @author bratseth
*/
// TODO: Remove on Vespa 7
class ConfiguredSearcherHelper {
/** No instantiation */
private ConfiguredSearcherHelper() { }
public static List<Connection> toConnectionList(ProviderConfig providerConfig) {
List<Connection> connections=new ArrayList<>();
for(ProviderConfig.Node node : providerConfig.node()) {
connections.add(new Connection(node.host(), node.port()));
}
return connections;
}
}
|