Class BlobConfiguration
java.lang.Object
org.apache.camel.component.azure.storage.blob.BlobConfiguration
- All Implemented Interfaces:
Cloneable
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncopy()Access key for the associated azure account name to be used for authentication with azure blob servicesAzure account name to be used for authentication with azure blob servicesThe blob name, to consume specific blob from a container.longSet the blob offset for the upload or download operations, default is 0A user-controlled value that you can use to track requests.The blob type in order to initiate the appropriate settings for each blob typecom.azure.storage.blob.models.BlockListTypeSpecifies which type of blocks to return.com.azure.core.util.ContextWhen using `getChangeFeed` producer operation, this gives additional context that is passed through the Http pipeline during the service call.When using `getChangeFeed` producer operation, this filters the results to return events approximately before the end time.When using `getChangeFeed` producer operation, this filters the results to return events approximately after the start time.The blob container namecom.azure.storage.common.StorageSharedKeyCredentialStorageSharedKeyCredential can be injected to create the azure client, this holds the important authentication informationHow many bytes to include in the range.Override the default expiration (millis) of URL download link.The file directory where the downloaded blobs will be saved to, this can be used in both, producer and consumerGets the lease duration in seconds.Specifies the maximum number of blobs to return, including all BlobPrefix elements.intSpecifies the maximum number of additional HTTP Get requests that will be made while reading the data from a response body.The blob operation that can be used with this component on the producerSpecifies the maximum size for the page blob, up to 8 TB.Filters the results to return only blobs whose names begin with the specified prefix.getRegex()Filters the results to return only blobs whose names match the specified regular expression.com.azure.storage.blob.BlobServiceClientClient to a storage account.An optional timeout value beyond which aRuntimeExceptionwill be raised.booleanClose the stream after read or keep it open, default is truebooleanClose the stream after write or keep it open, default is truebooleanWhen is set to `true`, the staged blocks will not be committed directly.booleanWhen is set to `true`, the append blocks will be created when committing append blocks.booleanWhen is set to `true`, the page blob will be created when uploading page blob.booleanGets whether a lease should be acquired when accessing the blob.voidsetAccessKey(String accessKey) voidsetAccountName(String accountName) voidsetBlobName(String blobName) voidsetBlobOffset(long blobOffset) voidsetBlobSequenceNumber(Long blobSequenceNumber) voidsetBlobType(BlobType blobType) voidsetBlockListType(com.azure.storage.blob.models.BlockListType blockListType) voidsetChangeFeedContext(com.azure.core.util.Context changeFeedContext) voidsetChangeFeedEndTime(OffsetDateTime changeFeedEndTime) voidsetChangeFeedStartTime(OffsetDateTime changeFeedStartTime) voidsetCloseStreamAfterRead(boolean closeStreamAfterRead) voidsetCloseStreamAfterWrite(boolean closeStreamAfterWrite) voidsetCommitBlockListLater(boolean commitBlockListLater) voidsetContainerName(String containerName) voidsetCreateAppendBlob(boolean createAppendBlob) voidsetCreatePageBlob(boolean createPageBlob) voidsetCredentials(com.azure.storage.common.StorageSharedKeyCredential credentials) voidsetCredentialType(CredentialType credentialType) Determines the credential strategy to adoptvoidsetDataCount(Long dataCount) voidsetDownloadLinkExpiration(Long downloadLinkExpiration) voidsetFileDir(String fileDir) voidsetLeaseBlob(boolean leaseBlob) Sets whether a lease should be acquired when accessing the blob.voidsetLeaseDurationInSeconds(Integer leaseDurationInSeconds) Sets the lease duration in seconds.voidsetMaxResultsPerPage(Integer maxResultsPerPage) voidsetMaxRetryRequests(int maxRetryRequests) voidsetOperation(BlobOperationsDefinition operation) voidsetPageBlobSize(Long pageBlobSize) voidvoidvoidsetSasToken(String sasToken) In case of usage of Shared Access Signature we'll need to set a SAS TokenvoidsetServiceClient(com.azure.storage.blob.BlobServiceClient serviceClient) voidsetSourceBlobAccessKey(String sourceBlobAccessKey) Source Blob Access Key: for copyblob operation, sadly, we need to have an accessKey for the source blob we want to copy Passing an accessKey as header, it's unsafe so we could set as key.voidsetTimeout(Duration timeout)
-
Constructor Details
-
BlobConfiguration
public BlobConfiguration()
-
-
Method Details
-
getAccountName
Azure account name to be used for authentication with azure blob services -
setAccountName
-
getContainerName
The blob container name -
setContainerName
-
getCredentials
public com.azure.storage.common.StorageSharedKeyCredential getCredentials()StorageSharedKeyCredential can be injected to create the azure client, this holds the important authentication information -
getServiceClient
public com.azure.storage.blob.BlobServiceClient getServiceClient()Client to a storage account. This client does not hold any state about a particular storage account but is instead a convenient way of sending off appropriate requests to the resource on the service. It may also be used to construct URLs to blobs and containers.This client contains operations on a service account. Operations on a container are available on
BlobContainerClientthroughBlobServiceClient.getBlobContainerClient(String), and operations on a blob are available onBlobClientthroughBlobContainerClient.getBlobClient(String). -
setServiceClient
public void setServiceClient(com.azure.storage.blob.BlobServiceClient serviceClient) -
getAccessKey
Access key for the associated azure account name to be used for authentication with azure blob services -
setAccessKey
-
getOperation
The blob operation that can be used with this component on the producer -
setOperation
-
getBlobName
The blob name, to consume specific blob from a container. However, on producer it is only required for the operations on the blob level -
setBlobName
-
getBlobType
The blob type in order to initiate the appropriate settings for each blob type -
setBlobType
-
getFileDir
The file directory where the downloaded blobs will be saved to, this can be used in both, producer and consumer -
setFileDir
-
getBlobOffset
public long getBlobOffset()Set the blob offset for the upload or download operations, default is 0 -
setBlobOffset
public void setBlobOffset(long blobOffset) -
getDataCount
How many bytes to include in the range. Must be greater than or equal to 0 if specified. -
setDataCount
-
getMaxRetryRequests
public int getMaxRetryRequests()Specifies the maximum number of additional HTTP Get requests that will be made while reading the data from a response body. -
setMaxRetryRequests
public void setMaxRetryRequests(int maxRetryRequests) -
getTimeout
An optional timeout value beyond which aRuntimeExceptionwill be raised. -
setTimeout
-
getPrefix
Filters the results to return only blobs whose names begin with the specified prefix. May be null to return all blobs. -
setPrefix
-
getMaxResultsPerPage
Specifies the maximum number of blobs to return, including all BlobPrefix elements. If the request does not specify maxResultsPerPage or specifies a value greater than 5,000, the server will return up to 5,000 items. -
setMaxResultsPerPage
-
isCloseStreamAfterRead
public boolean isCloseStreamAfterRead()Close the stream after read or keep it open, default is true -
setCloseStreamAfterRead
public void setCloseStreamAfterRead(boolean closeStreamAfterRead) -
isCloseStreamAfterWrite
public boolean isCloseStreamAfterWrite()Close the stream after write or keep it open, default is true -
setCloseStreamAfterWrite
public void setCloseStreamAfterWrite(boolean closeStreamAfterWrite) -
getPageBlobSize
Specifies the maximum size for the page blob, up to 8 TB. The page blob size must be aligned to a 512-byte boundary. -
setPageBlobSize
-
getDownloadLinkExpiration
Override the default expiration (millis) of URL download link. -
setDownloadLinkExpiration
-
isCommitBlockListLater
public boolean isCommitBlockListLater()When is set to `true`, the staged blocks will not be committed directly. -
setCommitBlockListLater
public void setCommitBlockListLater(boolean commitBlockListLater) -
isCreateAppendBlob
public boolean isCreateAppendBlob()When is set to `true`, the append blocks will be created when committing append blocks. -
setCreateAppendBlob
public void setCreateAppendBlob(boolean createAppendBlob) -
isCreatePageBlob
public boolean isCreatePageBlob()When is set to `true`, the page blob will be created when uploading page blob. -
setCreatePageBlob
public void setCreatePageBlob(boolean createPageBlob) -
getBlobSequenceNumber
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. -
setBlobSequenceNumber
-
getBlockListType
public com.azure.storage.blob.models.BlockListType getBlockListType()Specifies which type of blocks to return. -
setBlockListType
public void setBlockListType(com.azure.storage.blob.models.BlockListType blockListType) -
getChangeFeedStartTime
When using `getChangeFeed` producer operation, this filters the results to return events approximately after the start time. Note: A few events belonging to the previous hour can also be returned. A few events belonging to this hour can be missing; to ensure all events from the hour are returned, round the start time down by an hour. -
setChangeFeedStartTime
-
getChangeFeedEndTime
When using `getChangeFeed` producer operation, this filters the results to return events approximately before the end time. Note: A few events belonging to the next hour can also be returned. A few events belonging to this hour can be missing; to ensure all events from the hour are returned, round the end time up by an hour. -
setChangeFeedEndTime
-
getChangeFeedContext
public com.azure.core.util.Context getChangeFeedContext()When using `getChangeFeed` producer operation, this gives additional context that is passed through the Http pipeline during the service call. -
setChangeFeedContext
public void setChangeFeedContext(com.azure.core.util.Context changeFeedContext) -
getRegex
Filters the results to return only blobs whose names match the specified regular expression. May be null to return all if both prefix and regex are set, regex takes the priority and prefix is ignored. -
setRegex
-
getSourceBlobAccessKey
-
getCredentialType
-
setCredentialType
Determines the credential strategy to adopt -
setSourceBlobAccessKey
Source Blob Access Key: for copyblob operation, sadly, we need to have an accessKey for the source blob we want to copy Passing an accessKey as header, it's unsafe so we could set as key. -
getSasToken
-
setSasToken
In case of usage of Shared Access Signature we'll need to set a SAS Token -
isLeaseBlob
public boolean isLeaseBlob()Gets whether a lease should be acquired when accessing the blob. When enabled, a lease is acquired before performing blob operations that require exclusive access (e.g., uploading or deleting).- Returns:
- true if a lease should be used; false otherwise
-
setLeaseBlob
public void setLeaseBlob(boolean leaseBlob) Sets whether a lease should be acquired when accessing the blob. When set to true, the component will acquire a lease before performing blob operations that require exclusive access.- Parameters:
leaseBlob- true to acquire a lease before blob operations; false otherwise
-
getLeaseDurationInSeconds
Gets the lease duration in seconds. Valid values are between 15 and 60 for fixed leases, or -1 for infinite. -
setLeaseDurationInSeconds
Sets the lease duration in seconds. Use -1 for infinite or a value between 15 and 60 for fixed leases. -
copy
-