public Collection < String > getCandidateEIPs ( String myInstanceId , String myZone ) { if ( myZone == null ) { myZone = "us-east-1d" ; } Collection < String > eipCandidates = clientConfig . shouldUseDnsForFetchingServiceUrls ( ) ? getEIPsForZoneFromDNS ( myZone ) : getEIPsForZoneFromConfig ( myZone ) ; if ( eipCandidates == null || eipCandidates . size ( ) == 0 ) { throw new RuntimeException ( "Could not get any elastic ips from the EIP pool for zone :" + myZone ) ; } return eipCandidates ; }
Get the list of EIPs in the order of preference depending on instance zone .