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-examples] Add glacier example (#58)
Date Sat, 09 Aug 2014 13:56:44 GMT
> +
> +      // Create a container
> +      final String containerName = UUID. randomUUID().toString() + "_interruptionExample";
> +      blobstore.createContainerInLocation(null, containerName); // Create a vault
> +
> +      // Create a blob
> +      ByteSource payload = ByteSource.wrap("data".getBytes(Charsets.UTF_8));
> +      Blob blob = blobstore.blobBuilder("ignored") // The blob name is ignored in Glacier
> +            .payload(payload)
> +            .contentLength(payload.size())
> +            .build();
> +
> +      // Put the blob in the container
> +      final String blobId = blobstore.putBlob(containerName, blob);
> +
> +      // New thread

Is explicit thread management of this kind still "good style"? I thought the idea was to use
executors for all this kind of stuff?

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