use of com.netflix.dyno.connectionpool.HostSupplier in project dynomite-cluster-checker by diegopacheco.
the class SimpleConnectionTest method toHostSupplier.
private static HostSupplier toHostSupplier(List<DynomiteNodeInfo> nodes) {
final List<Host> hosts = new ArrayList<Host>();
for (DynomiteNodeInfo node : nodes) {
hosts.add(buildHost(node));
}
final HostSupplier customHostSupplier = new HostSupplier() {
@Override
public Collection<Host> getHosts() {
return hosts;
}
};
return customHostSupplier;
}
use of com.netflix.dyno.connectionpool.HostSupplier in project dynomite-cluster-checker by diegopacheco.
the class HostSupplierFactory method build.
public static HostSupplier build(List<DynomiteNodeInfo> nodes) {
final List<Host> hosts = new ArrayList<Host>();
for (DynomiteNodeInfo node : nodes) {
hosts.add(node.toHOST());
}
final HostSupplier customHostSupplier = new HostSupplier() {
@Override
public Collection<Host> getHosts() {
return hosts;
}
};
return customHostSupplier;
}
Aggregations