algoliasearch/src/main/java/com/algolia/search/saas/AbstractClient.java
private List<String> hostsThatAreUp(List<String> hosts) {
        List<String> upHosts = new ArrayList<>();
        for (String host : hosts) {
            if (isUpOrCouldBeRetried(host)) {
                upHosts.add(host);
            }
        }
        return upHosts.isEmpty() ? hosts : upHosts;
    }
private List<String> hostsThatAreUp(List<String> hosts) {
        List<String> upHosts = new ArrayList<>();
        for (String host : hosts) {
            if (isUpOrCouldBeRetried(host)) {
                upHosts.add(host);
            }
        }
        return upHosts.isEmpty() ? hosts : upHosts;
    }
private List < String > hostsThatAreUp ( List < String > hosts ) { List < String > upHosts = new ArrayList <> ( ) ; for ( String host : hosts ) { if ( isUpOrCouldBeRetried ( host ) ) { upHosts . add ( host ) ; } } return upHosts . isEmpty ( ) ? hosts : upHosts ; }
Get the hosts that are not considered down in a given list.

@param hosts a list of hosts whose {@link HostStatus} will be checked.
@return the hosts considered up, or all hosts if none is known to be reachable.
Get the hosts that are not considered down in a given list .