jclouds-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew Gaul <notificati...@github.com>
Subject Re: [jclouds] Delete objects in a container efficiently. (#214)
Date Tue, 25 Mar 2014 17:03:49 GMT
> +         final String fullPath = parentIsFolder(options, md) ? options.getDir()
> +               + "/" + md.getName() : md.getName();
> +
> +            // Attempt to acquire a semaphore within the time limit. At least
> +            // one outstanding future should complete within this period for the
> +            // semaphore to be acquired.
> +         try {
> +            if (!semaphore.tryAcquire(maxTime, TimeUnit.MILLISECONDS)) {
> +               throw new TimeoutException("Timeout waiting for semaphore");
> +            }
> +         } catch (InterruptedException ie) {
> +            logger.debug("Interrupted while deleting blobs");
> +            Thread.currentThread().interrupt();
> +         }
> +
> +         final ListenableFuture<Void> blobDelFuture;

If you wrap ```blobDelFuture``` in an ```Optional``` will this remove some of the duplicated
null assignments?

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