> +   }
> +
> +   @Inject
> +   public BasePollingStrategy(GlacierClient client) {
> +      this(DEFAULT_INITIAL_WAIT, DEFAULT_TIME_BETWEEN_POLLS, client);
> +   }
> +
> +   private boolean inProgress(String job, String vault) {
> +      JobMetadata jobMetadata = client.describeJob(vault, job);
> +      return (jobMetadata != null) && (jobMetadata.getStatusCode() == 
> JobStatus.IN_PROGRESS);
> +   }
> +
> +   private void waitForJob(String job, String vault) throws 
> InterruptedException {
> +      Thread.sleep(initialWait);
> +      while (inProgress(job, vault)) {
> +         Thread.sleep(timeBetweenPolls);

Is there any specific reason to allow interruption here (given the long 
potential runtime of Glacier, perhaps yes)? Otherwise, consider 
[`sleepUninterruptibly`](http://docs.guava-libraries.googlecode.com/git/javadoc/com/google/common/util/concurrent/Uninterruptibles.html#sleepUninterruptibly%28long,%20java.util.concurrent.TimeUnit%29)?

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-labs-aws/pull/44/files#r15726002

Reply via email to