List of usage examples for com.amazonaws.services.route53.model AmazonRoute53Exception getMessage
@Override
public String getMessage()
From source file:tech.greenfield.aws.route53.EventHandler.java
License:Open Source License
private void retryIfThrottled(Route53UpdateTask action) throws NoIpException { while (true) { try {//from w ww. j a va2 s .c om action.run(); return; } catch (AmazonRoute53Exception e) { // retry in case of if (e.getMessage().contains("Rate exceeded")) { logger.info("Throttled: " + e); try { Thread.sleep(2000); logger.info("Retrying..."); } catch (InterruptedException e1) { } continue; } else throw e; } } }