Examples of PutOptions


Examples of aQute.bnd.service.RepositoryPlugin.PutOptions

    File dstBundle = null;
    try {
      File srcBundle = IO.getFile("testresources/test.jar");
      byte[] srcSha = calculateHash(sha1, srcBundle);

      PutOptions options = new RepositoryPlugin.PutOptions();
      options.digest = srcSha;

      PutResult r = testRepo.put(new BufferedInputStream(new FileInputStream(srcBundle)), options);

      dstBundle = new File(r.artifact);

Examples of org.jclouds.blobstore.options.PutOptions

            payloadBuilder = payloadBuilder.contentMD5(byteSource.hash(Hashing.md5()).asBytes());
         }
         builder = payloadBuilder;
      }

      PutOptions options = multipartUpload ? new PutOptions().multipart(true) : PutOptions.NONE;

      write(blobStore, containerName, blobName, builder.build(), options, signedRequest);

      cacheProvider.getProviderCacheForType("container").put(blobStore.getContext().unwrap().getId(), containerName);
      cacheProvider.getProviderCacheForType("blob").put(blobStore.getContext().unwrap().getId(), blobName);

Examples of org.jclouds.blobstore.options.PutOptions

            payloadBuilder = payloadBuilder.calculateMD5();
         }
         builder = payloadBuilder;
      }

      PutOptions options = multipartUpload ? new PutOptions().multipart(true) : PutOptions.NONE;
      write(blobStore, containerName, blobName, builder.build(), options);

      cacheProvider.getProviderCacheForType("container").put(blobStore.getContext().unwrap().getId(), containerName);
      cacheProvider.getProviderCacheForType("blob").put(blobStore.getContext().unwrap().getId(), blobName);

Examples of org.jclouds.blobstore.options.PutOptions

                     }
                  } else {
                     // Issue 936: don't just call putBlob, as that will see options=multiPart and
                     // recursively call this execute method again; instead mark as not multipart
                     // because it can all fit in one go.
                     PutOptions nonMultipartOptions = PutOptions.Builder.multipart(false);
                     ListenableFuture<String> futureETag = ablobstore.putBlob(container, blob, nonMultipartOptions);
                     return maxTime != null ?
                           futureETag.get(maxTime,TimeUnit.SECONDS) : futureETag.get();
                  }
               }

Examples of org.jclouds.blobstore.options.PutOptions

                     }
                  } else {
                     // Issue 936: don't just call putBlob, as that will see options=multiPart and
                     // recursively call this execute method again; instead mark as not multipart
                     // because it can all fit in one go.
                     PutOptions nonMultipartOptions = PutOptions.Builder.multipart(false);
                     ListenableFuture<String> futureETag = ablobstore.putBlob(container, blob, nonMultipartOptions);
                     return maxTime != null ?
                           futureETag.get(maxTime, TimeUnit.SECONDS) : futureETag.get();
                  }
               }

Examples of org.jclouds.blobstore.options.PutOptions

            payloadBuilder = payloadBuilder.calculateMD5();
         }
         builder = payloadBuilder;
      }

      PutOptions options = multipartUpload ? new PutOptions().multipart(true) : PutOptions.NONE;

      write(blobStore, containerName, blobName, builder.build(), options, signedRequest);

      cacheProvider.getProviderCacheForType("container").put(blobStore.getContext().unwrap().getId(), containerName);
      cacheProvider.getProviderCacheForType("blob").put(blobStore.getContext().unwrap().getId(), blobName);

Examples of org.jclouds.blobstore.options.PutOptions

            }
            if (contentMD5 != null) {
                builder = builder.contentMD5(contentMD5);
            }

            PutOptions options = new PutOptions()
                .multipart(forceMultiPartUpload);
            try {
                String eTag = blobStore.putBlob(containerName, builder.build(),
                        options);
                // S3 quotes ETag while Swift does not

Examples of org.jclouds.blobstore.options.PutOptions

                     }
                  } else {
                     // Issue 936: don't just call putBlob, as that will see options=multiPart and
                     // recursively call this execute method again; instead mark as not multipart
                     // because it can all fit in one go.
                     PutOptions nonMultipartOptions = PutOptions.Builder.multipart(false);
                     ListenableFuture<String> futureETag = ablobstore.putBlob(container, blob, nonMultipartOptions);
                     return maxTime != null ?
                           futureETag.get(maxTime,TimeUnit.SECONDS) : futureETag.get();
                  }
               }

Examples of org.jclouds.blobstore.options.PutOptions

            .payload(payload)
            .contentLength(payload.size())
            .build();

      // Create the PutOptions
      PutOptions options = PutOptions.Builder.multipart(true);

      // Put the blob in the container
      blobstore.putBlob(containerName, blob, options);
      System.out.println("The blob has been uploaded");
   }

Examples of org.jclouds.blobstore.options.PutOptions

                     }
                  } else {
                     // Issue 936: don't just call putBlob, as that will see options=multiPart and
                     // recursively call this execute method again; instead mark as not multipart
                     // because it can all fit in one go.
                     final PutOptions nonMultipartOptions = PutOptions.Builder.multipart(false);
                     ListenableFuture<String> futureETag = executor.submit(new Callable<String>() {
                        @Override public String call() throws Exception {
                           return blobstore.putBlob(container, blob, nonMultipartOptions);
                        }
                     });
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.