jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Phillips <notificati...@github.com>
Subject Re: [jclouds-labs-aws] JCLOUDS-457: Add polling strategy (#44)
Date Sat, 02 Aug 2014 01:17:17 GMT
> +   private final long timeBetweenPolls;
> +
> +   public BasePollingStrategy(long initialWait, long timeBetweenPolls, GlacierClient
client) {
> +      this.initialWait = initialWait;
> +      this.timeBetweenPolls = timeBetweenPolls;
> +      this.client = checkNotNull(client, "client");
> +   }
> +
> +   @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);

`describeJob` is [not documented](https://github.com/jclouds/jclouds-labs-aws/blob/master/glacier/src/main/java/org/jclouds/glacier/GlacierClient.java#L248)
as returning `null`. Can it? If so, update the Javadoc to explain that?

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