public final class PageBlobAsyncClient extends BlobAsyncClient
BlobClientBuilder, via the method BlobAsyncClient.asPageBlobAsyncClient(), or via the method
ContainerAsyncClient.getPageBlobAsyncClient(String). This class does not hold any state about a particular
blob, but is instead a convenient way of sending appropriate requests to the resource on the service.
This client contains operations on a blob. Operations on a container are available on ContainerAsyncClient,
and operations on the service are available on BlobServiceAsyncClient.
Please refer to the Azure Docs for more information.
Note this client is an async client that returns reactive responses from Spring Reactor Core project
(https://projectreactor.io/). Calling the methods in this client will NOT start the actual network
operation, until .subscribe() is called on the reactive response. You can simply convert one of these
responses to a CompletableFuture object through Mono.toFuture().
| Modifier and Type | Field and Description |
|---|---|
static int |
MAX_PUT_PAGES_BYTES
Indicates the maximum number of bytes that may be sent in a call to putPage.
|
static int |
PAGE_BYTES
Indicates the number of bytes in a page.
|
cpk, snapshot| Modifier and Type | Method and Description |
|---|---|
reactor.core.publisher.Mono<PageBlobItem> |
clearPages(PageRange pageRange)
Frees the specified pages from the page blob.
|
reactor.core.publisher.Mono<Response<PageBlobItem>> |
clearPagesWithResponse(PageRange pageRange,
PageBlobAccessConditions pageBlobAccessConditions)
Frees the specified pages from the page blob.
|
reactor.core.publisher.Mono<CopyStatusType> |
copyIncremental(URL source,
String snapshot)
Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.
|
reactor.core.publisher.Mono<Response<CopyStatusType>> |
copyIncrementalWithResponse(URL source,
String snapshot,
ModifiedAccessConditions modifiedAccessConditions)
Begins an operation to start an incremental copy from one page blob's snapshot to this page blob.
|
reactor.core.publisher.Mono<Response<PageBlobItem>> |
createWithResponse(long size,
Long sequenceNumber,
BlobHTTPHeaders headers,
Metadata metadata,
BlobAccessConditions accessConditions)
Creates a page blob of the specified length.
|
reactor.core.publisher.Mono<PageList> |
getPageRanges(BlobRange blobRange)
Returns the list of valid page ranges for a page blob or snapshot of a page blob.
|
reactor.core.publisher.Mono<PageList> |
getPageRangesDiff(BlobRange blobRange,
String prevSnapshot)
Gets the collection of page ranges that differ between a specified snapshot and this page blob.
|
reactor.core.publisher.Mono<Response<PageList>> |
getPageRangesDiffWithResponse(BlobRange blobRange,
String prevSnapshot,
BlobAccessConditions accessConditions)
Gets the collection of page ranges that differ between a specified snapshot and this page blob.
|
reactor.core.publisher.Mono<Response<PageList>> |
getPageRangesWithResponse(BlobRange blobRange,
BlobAccessConditions accessConditions)
Returns the list of valid page ranges for a page blob or snapshot of a page blob.
|
reactor.core.publisher.Mono<PageBlobItem> |
resize(long size)
Resizes the page blob to the specified size (which must be a multiple of 512).
|
reactor.core.publisher.Mono<Response<PageBlobItem>> |
resizeWithResponse(long size,
BlobAccessConditions accessConditions)
Resizes the page blob to the specified size (which must be a multiple of 512).
|
reactor.core.publisher.Mono<PageBlobItem> |
setCreate(long size)
Creates a page blob of the specified length.
|
reactor.core.publisher.Mono<PageBlobItem> |
updateSequenceNumber(SequenceNumberActionType action,
Long sequenceNumber)
Sets the page blob's sequence number.
|
reactor.core.publisher.Mono<Response<PageBlobItem>> |
updateSequenceNumberWithResponse(SequenceNumberActionType action,
Long sequenceNumber,
BlobAccessConditions accessConditions)
Sets the page blob's sequence number.
|
reactor.core.publisher.Mono<PageBlobItem> |
uploadPages(PageRange pageRange,
reactor.core.publisher.Flux<ByteBuffer> body)
Writes 1 or more pages to the page blob.
|
reactor.core.publisher.Mono<PageBlobItem> |
uploadPagesFromURL(PageRange range,
URL sourceURL,
Long sourceOffset)
Writes 1 or more pages from the source page blob to this page blob.
|
reactor.core.publisher.Mono<Response<PageBlobItem>> |
uploadPagesFromURLWithResponse(PageRange range,
URL sourceURL,
Long sourceOffset,
byte[] sourceContentMD5,
PageBlobAccessConditions destAccessConditions,
SourceModifiedAccessConditions sourceAccessConditions)
Writes 1 or more pages from the source page blob to this page blob.
|
reactor.core.publisher.Mono<Response<PageBlobItem>> |
uploadPagesWithResponse(PageRange pageRange,
reactor.core.publisher.Flux<ByteBuffer> body,
PageBlobAccessConditions pageBlobAccessConditions)
Writes 1 or more pages to the page blob.
|
abortCopyFromURL, abortCopyFromURLWithResponse, asAppendBlobAsyncClient, asBlockBlobAsyncClient, asPageBlobAsyncClient, copyFromURL, copyFromURLWithResponse, createSnapshot, createSnapshotWithResponse, delete, deleteWithResponse, download, downloadToFile, downloadToFile, downloadWithResponse, exists, existsWithResponse, generateSAS, generateSAS, generateSAS, generateSAS, generateUserDelegationSAS, generateUserDelegationSAS, generateUserDelegationSAS, getAccountInfo, getAccountInfoWithResponse, getBlobUrl, getContainerAsyncClient, getHttpPipeline, getProperties, getPropertiesWithResponse, getSnapshotClient, getSnapshotId, isSnapshot, setHTTPHeaders, setHTTPHeadersWithResponse, setMetadata, setMetadataWithResponse, setTier, setTierWithResponse, startCopyFromURL, startCopyFromURLWithResponse, undelete, undeleteWithResponsepublic static final int PAGE_BYTES
public static final int MAX_PUT_PAGES_BYTES
public reactor.core.publisher.Mono<PageBlobItem> setCreate(long size)
size - Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a
512-byte boundary.public reactor.core.publisher.Mono<Response<PageBlobItem>> createWithResponse(long size, Long sequenceNumber, BlobHTTPHeaders headers, Metadata metadata, BlobAccessConditions accessConditions)
size - Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a
512-byte boundary.sequenceNumber - A user-controlled value that you can use to track requests. The value of the sequence
number must be between 0 and 2^63 - 1.The default value is 0.headers - BlobHTTPHeadersmetadata - MetadataaccessConditions - BlobAccessConditionsIllegalArgumentException - If size isn't a multiple of PageBlobAsyncClient.PAGE_BYTES or
sequenceNumber isn't null and is less than 0.public reactor.core.publisher.Mono<PageBlobItem> uploadPages(PageRange pageRange, reactor.core.publisher.Flux<ByteBuffer> body)
Note that the data passed must be replayable if retries are enabled (the default). In other words, the
Flux must produce the same data each time it is subscribed to.
pageRange - A PageRange object. Given that pages must be aligned with 512-byte boundaries, the start
offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges
are 0-511, 512-1023, etc.body - The data to upload. Note that this Flux must be replayable if retries are enabled (the
default). In other words, the Flowable must produce the same data each time it is subscribed to.public reactor.core.publisher.Mono<Response<PageBlobItem>> uploadPagesWithResponse(PageRange pageRange, reactor.core.publisher.Flux<ByteBuffer> body, PageBlobAccessConditions pageBlobAccessConditions)
Note that the data passed must be replayable if retries are enabled (the default). In other words, the
Flux must produce the same data each time it is subscribed to.
pageRange - A PageRange object. Given that pages must be aligned with 512-byte boundaries, the start
offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges
are 0-511, 512-1023, etc.body - The data to upload. Note that this Flux must be replayable if retries are enabled (the
default). In other words, the Flowable must produce the same data each time it is subscribed to.pageBlobAccessConditions - PageBlobAccessConditionsIllegalArgumentException - If pageRange is nullpublic reactor.core.publisher.Mono<PageBlobItem> uploadPagesFromURL(PageRange range, URL sourceURL, Long sourceOffset)
range - A PageRange object. Given that pages must be aligned with 512-byte boundaries, the start
offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges
are 0-511, 512-1023, etc.sourceURL - The url to the blob that will be the source of the copy. A source blob in the same storage
account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob
must either be public or must be authenticated via a shared access signature. If the source blob is public, no
authentication is required to perform the operation.sourceOffset - The source offset to copy from. Pass null or 0 to copy from the beginning of source page
blob.public reactor.core.publisher.Mono<Response<PageBlobItem>> uploadPagesFromURLWithResponse(PageRange range, URL sourceURL, Long sourceOffset, byte[] sourceContentMD5, PageBlobAccessConditions destAccessConditions, SourceModifiedAccessConditions sourceAccessConditions)
range - The destination PageRange range. Given that pages must be aligned with 512-byte boundaries,
the start offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte
ranges are 0-511, 512-1023, etc.sourceURL - The url to the blob that will be the source of the copy. A source blob in the same storage
account can be authenticated via Shared Key. However, if the source is a blob in another account, the source blob
must either be public or must be authenticated via a shared access signature. If the source blob is public, no
authentication is required to perform the operation.sourceOffset - The source offset to copy from. Pass null or 0 to copy from the beginning of source blob.sourceContentMD5 - An MD5 hash of the block content from the source blob. If specified, the service will
calculate the MD5 of the received data and fail the request if it does not match the provided MD5.destAccessConditions - PageBlobAccessConditionssourceAccessConditions - SourceModifiedAccessConditionsIllegalArgumentException - If range is nullpublic reactor.core.publisher.Mono<PageBlobItem> clearPages(PageRange pageRange)
pageRange - A PageRange object. Given that pages must be aligned with 512-byte boundaries, the start
offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges
are 0-511, 512-1023, etc.public reactor.core.publisher.Mono<Response<PageBlobItem>> clearPagesWithResponse(PageRange pageRange, PageBlobAccessConditions pageBlobAccessConditions)
pageRange - A PageRange object. Given that pages must be aligned with 512-byte boundaries, the start
offset must be a modulus of 512 and the end offset must be a modulus of 512 - 1. Examples of valid byte ranges
are 0-511, 512-1023, etc.pageBlobAccessConditions - PageBlobAccessConditionsIllegalArgumentException - If pageRange is nullpublic reactor.core.publisher.Mono<PageList> getPageRanges(BlobRange blobRange)
blobRange - BlobRangepublic reactor.core.publisher.Mono<Response<PageList>> getPageRangesWithResponse(BlobRange blobRange, BlobAccessConditions accessConditions)
blobRange - BlobRangeaccessConditions - BlobAccessConditionspublic reactor.core.publisher.Mono<PageList> getPageRangesDiff(BlobRange blobRange, String prevSnapshot)
blobRange - BlobRangeprevSnapshot - Specifies that the response will contain only pages that were changed between target blob and
previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as
long as the snapshot specified by prevsnapshot is the older of the two.public reactor.core.publisher.Mono<Response<PageList>> getPageRangesDiffWithResponse(BlobRange blobRange, String prevSnapshot, BlobAccessConditions accessConditions)
blobRange - BlobRangeprevSnapshot - Specifies that the response will contain only pages that were changed between target blob and
previous snapshot. Changed pages include both updated and cleared pages. The target blob may be a snapshot, as
long as the snapshot specified by prevsnapshot is the older of the two.accessConditions - BlobAccessConditionsIllegalArgumentException - If prevSnapshot is nullpublic reactor.core.publisher.Mono<PageBlobItem> resize(long size)
size - Resizes a page blob to the specified size. If the specified value is less than the current size of
the blob, then all pages above the specified value are cleared.public reactor.core.publisher.Mono<Response<PageBlobItem>> resizeWithResponse(long size, BlobAccessConditions accessConditions)
size - Resizes a page blob to the specified size. If the specified value is less than the current size of
the blob, then all pages above the specified value are cleared.accessConditions - BlobAccessConditionsIllegalArgumentException - If size isn't a multiple of PageBlobAsyncClient.PAGE_BYTESpublic reactor.core.publisher.Mono<PageBlobItem> updateSequenceNumber(SequenceNumberActionType action, Long sequenceNumber)
action - Indicates how the service should modify the blob's sequence number.sequenceNumber - The blob's sequence number. The sequence number is a user-controlled property that you can
use to track requests and manage concurrency issues.public reactor.core.publisher.Mono<Response<PageBlobItem>> updateSequenceNumberWithResponse(SequenceNumberActionType action, Long sequenceNumber, BlobAccessConditions accessConditions)
action - Indicates how the service should modify the blob's sequence number.sequenceNumber - The blob's sequence number. The sequence number is a user-controlled property that you can
use to track requests and manage concurrency issues.accessConditions - BlobAccessConditionsIllegalArgumentException - If sequenceNumber isn't null and is less than 0public reactor.core.publisher.Mono<CopyStatusType> copyIncremental(URL source, String snapshot)
source - The source page blob.snapshot - The snapshot on the copy source.public reactor.core.publisher.Mono<Response<CopyStatusType>> copyIncrementalWithResponse(URL source, String snapshot, ModifiedAccessConditions modifiedAccessConditions)
source - The source page blob.snapshot - The snapshot on the copy source.modifiedAccessConditions - Standard HTTP Access conditions related to the modification of data. ETag and
LastModifiedTime are used to construct conditions related to when the blob was changed relative to the given
request. The request will fail if the specified condition is not satisfied.Error - If source and snapshot form a malformed URL.Copyright © 2019 Microsoft Corporation. All rights reserved.