@Override public List<String> resolve(List<String> names) { // normalize all input names to be in the form of IP addresses names = NetUtils.normalizeHostNames(names); List <String> result = new ArrayList<String>(names.size()); if (names.isEmpty()) { return result; } List<String> uncachedHosts = getUncachedHosts(names); // Resolve the uncached hosts List<String> resolvedHosts = rawMapping.resolve(uncachedHosts); //cache them cacheResolvedHosts(uncachedHosts, resolvedHosts); //now look up the entire list in the cache return getCachedHosts(names); }
@Override public List<String> resolve(List<String> names) { // normalize all input names to be in the form of IP addresses names = NetUtils.normalizeHostNames(names); List <String> result = new ArrayList<String>(names.size()); if (names.isEmpty()) { return result; } List<String> uncachedHosts = getUncachedHosts(names); // Resolve the uncached hosts List<String> resolvedHosts = rawMapping.resolve(uncachedHosts); //cache them cacheResolvedHosts(uncachedHosts, resolvedHosts); //now look up the entire list in the cache return getCachedHosts(names); }
@Override public List<String> resolve(List<String> names) { // normalize all input names to be in the form of IP addresses names = NetUtils.normalizeHostNames(names); List <String> result = new ArrayList<String>(names.size()); if (names.isEmpty()) { return result; } List<String> uncachedHosts = getUncachedHosts(names); // Resolve the uncached hosts List<String> resolvedHosts = rawMapping.resolve(uncachedHosts); //cache them cacheResolvedHosts(uncachedHosts, resolvedHosts); //now look up the entire list in the cache return getCachedHosts(names); }
@Override public List<String> resolve(List<String> names) { // normalize all input names to be in the form of IP addresses names = NetUtils.normalizeHostNames(names); List <String> result = new ArrayList<String>(names.size()); if (names.isEmpty()) { return result; } List<String> uncachedHosts = getUncachedHosts(names); // Resolve the uncached hosts List<String> resolvedHosts = rawMapping.resolve(uncachedHosts); //cache them cacheResolvedHosts(uncachedHosts, resolvedHosts); //now look up the entire list in the cache return getCachedHosts(names); }
@Override public List<String> resolve(List<String> names) { // normalize all input names to be in the form of IP addresses names = NetUtils.normalizeHostNames(names); List <String> result = new ArrayList<String>(names.size()); if (names.isEmpty()) { return result; } List<String> uncachedHosts = getUncachedHosts(names); // Resolve the uncached hosts List<String> resolvedHosts = rawMapping.resolve(uncachedHosts); //cache them cacheResolvedHosts(uncachedHosts, resolvedHosts); //now look up the entire list in the cache return getCachedHosts(names); }