public static void setDnsCache(long expireMillis, String host, String... ips) {
        try {
            InetAddressCacheUtil.setInetAddressCache(host, ips, System.currentTimeMillis() + expireMillis);
        } catch (Exception e) {
            final String message = String.format("Fail to setDnsCache for host %s ip %s expireMillis %s, cause: %s",
                    host, Arrays.toString(ips), expireMillis, e.toString());
            throw new DnsCacheManipulatorException(message, e);
        }
    }
public static void setDnsCache ( long expireMillis , String host , String ... ips ) { try { InetAddressCacheUtil . setInetAddressCache ( host , ips , System . currentTimeMillis ( ) + expireMillis ) ; } catch ( Exception e ) { final String message = String . format ( "Fail to setDnsCache for host %s ip %s expireMillis %s, cause: %s" , host , Arrays . toString ( ips ) , expireMillis , e . toString ( ) ) ; throw new DnsCacheManipulatorException ( message , e ) ; } }
Set a dns cache entry.

@param expireMillis expire time in milliseconds.
@param host         host
@param ips          ips
@throws DnsCacheManipulatorException Operation fail