@Override public void commitBlockList(List<BlockEntry> blockList, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws IOException, StorageException { ((CloudBlockBlob) getBlob()).commitBlockList(blockList, accessCondition, options, opContext); } }
@Override public void commitBlockList(List<BlockEntry> blockList, AccessCondition accessCondition, BlobRequestOptions options, OperationContext opContext) throws IOException, StorageException { ((CloudBlockBlob) getBlob()).commitBlockList(blockList, accessCondition, options, opContext); } }
/** * Commits a block list to the storage service. In order to be written as part of a blob, a block must have been * successfully written to the server in a prior uploadBlock operation. * * @param blockList * An enumerable collection of {@link BlockEntry} objects that represents the list block items being * committed. The <code>size</code> field is ignored. * * @throws StorageException * If a storage service error occurred. */ @DoesServiceRequest public void commitBlockList(final Iterable<BlockEntry> blockList) throws StorageException { this.commitBlockList(blockList, null /* accessCondition */, null /* options */, null /* opContext */); }
/** * Commits a block list to the storage service. In order to be written as part of a blob, a block must have been * successfully written to the server in a prior uploadBlock operation. * * @param blockList * An enumerable collection of {@link BlockEntry} objects that represents the list block items being * committed. The <code>size</code> field is ignored. * * @throws StorageException * If a storage service error occurred. */ @DoesServiceRequest public void commitBlockList(final Iterable<BlockEntry> blockList) throws StorageException { this.commitBlockList(blockList, null /* accessCondition */, null /* options */, null /* opContext */); }
private void commitBlobBlockList(Exchange exchange) throws Exception { Object object = exchange.getIn().getMandatoryBody(); List<BlockEntry> blockEntries = null; if (object instanceof List) { blockEntries = blockEntries; } else if (object instanceof BlockEntry) { blockEntries = Collections.singletonList((BlockEntry)object); } if (blockEntries == null || blockEntries.isEmpty()) { throw new IllegalArgumentException("Illegal commit block list payload"); } CloudBlockBlob client = BlobServiceUtil.createBlockBlobClient(getConfiguration()); BlobServiceRequestOptions opts = BlobServiceUtil.getRequestOptions(exchange); LOG.trace("Putting a blob [{}] block list from exchange [{}]...", getConfiguration().getBlobName(), exchange); client.commitBlockList(blockEntries, opts.getAccessCond(), opts.getRequestOpts(), opts.getOpContext()); }
Boolean.class); if (Boolean.TRUE != commitBlockListLater) { client.commitBlockList(blockEntries, opts.getAccessCond(), opts.getRequestOpts(), opts.getOpContext());
/** * Commits the blob, for block blob this uploads the block list. * * @throws StorageException * An exception representing any error which occurred during the operation. */ @DoesServiceRequest private synchronized void commit() throws StorageException { if (this.options.getStoreBlobContentMD5()) { this.parentBlobRef.getProperties().setContentMD5(Base64.encode(this.md5Digest.digest())); } if (this.streamType == BlobType.BLOCK_BLOB) { // wait for all blocks to finish final CloudBlockBlob blobRef = (CloudBlockBlob) this.parentBlobRef; blobRef.commitBlockList(this.blockList, this.accessCondition, this.options, this.opContext); } else if (this.options.getStoreBlobContentMD5()) { this.parentBlobRef.uploadProperties(this.accessCondition, this.options, this.opContext); } }
/** * Commits the blob, for block blob this uploads the block list. * * @throws StorageException * An exception representing any error which occurred during the operation. */ @DoesServiceRequest private synchronized void commit() throws StorageException { if (this.options.getStoreBlobContentMD5()) { this.parentBlobRef.getProperties().setContentMD5(Base64.encode(this.md5Digest.digest())); } if (this.streamType == BlobType.BLOCK_BLOB) { // wait for all blocks to finish final CloudBlockBlob blobRef = (CloudBlockBlob) this.parentBlobRef; blobRef.commitBlockList(this.blockList, this.accessCondition, this.options, this.opContext); } else if (this.options.getStoreBlobContentMD5()) { this.parentBlobRef.uploadProperties(this.accessCondition, this.options, this.opContext); } }
null, null); blob.commitBlockList(blocks);
blob.commitBlockList(blockEntries);
blob.uploadBlock(newBlockId, new ByteArrayInputStream(new byte[] { 6, 45 }), 2); blob.commitBlockList(Arrays.asList(new BlockEntry[] { new BlockEntry( newBlockId, BlockSearchMode.UNCOMMITTED) }));
blob.commitBlockList(blocks.values(), null, null, ctx); blob.commitBlockList(blocks.values(), null, opt, ctx);
this.commitBlockList(blockList,accessCondition, options, opContext);
blob.uploadBlock(newBlockId, new ByteArrayInputStream(new byte[] { 6, 45 }), 2); blob.commitBlockList(Arrays.asList(new BlockEntry[] { new BlockEntry( newBlockId, BlockSearchMode.UNCOMMITTED) }));
blockBlobRef.commitBlockList(blockList);
blob.uploadBlock(block.getId(), new ByteArrayInputStream(buffer), length); blob.commitBlockList(blocks.values());
destination.commitBlockList(new ArrayList<BlockEntry>());