> +import org.jclouds.Constants;
> +import org.jclouds.ContextBuilder;
> +import org.jclouds.blobstore.BlobStore;
> +import org.jclouds.blobstore.domain.Blob;
> +import org.jclouds.domain.Location;
> +import org.jclouds.io.Payloads;
> +import org.jclouds.openstack.swift.v1.blobstore.RegionScopedBlobStoreContext;
> +
> +public class BlobUploader implements Runnable {
> +   /**
> +    * ThreadLocal allows us to use 1 container and 1 connection per thread 
> and reuse them.
> +    * They need to be static, but here we also have to instantiate them at 
> runtime, as we pass parameters from
> +    * the command line.
> +    */
> +   private static ThreadLocal<BlobStore> blobStore = new 
> ThreadLocal<BlobStore>();
> +   private static ThreadLocal<String> container = new ThreadLocal<String>();

To be reused by threadpool threads for multiple files. That way the same 
blobstore and container is used to upload multiple files.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds-examples/pull/69/files#r22901548

Reply via email to