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 list operation (#46)
Date Sat, 02 Aug 2014 00:44:15 GMT
> @@ -99,7 +107,15 @@ public boolean createContainerInLocation(@Nullable Location location,
String con
>  
>     @Override
>     public PageSet<? extends StorageMetadata> list(String container, ListContainerOptions
listContainerOptions) {
> -      throw new UnsupportedOperationException();
> +      String jobId = sync.initiateJob(container, containerOptionsToInventoryRetrieval.apply(listContainerOptions));
> +      try {
> +         if (pollingStrategy.get().waitForSuccess(container, jobId)) {
> +            return archivesToBlobs.apply(sync.getInventoryRetrievalOutput(container,
jobId));
> +         }
> +         return null;
> +      } catch (InterruptedException e) {
> +         throw new RuntimeException(e);

As per the comments for other commits: we could/should (for consistency) also use Throwables.propagate
here.

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