DataLakeFileAppendOptions Class
- java.
lang. Object - com.
azure. storage. file. datalake. options. DataLakeFileAppendOptions
- com.
public class DataLakeFileAppendOptions
Optional parameters for appending data to a file.
Constructor Summary
Constructor | Description | |
---|---|---|
DataLakeFileAppendOptions() |
Method Summary
Modifier and Type | Method and Description |
---|---|
byte[] |
getContentMd5()
When this header is specified, the storage service compares the hash of the content that has arrived with this header value. |
Lease |
getLeaseAction()
Get lease action set on file. |
Integer | getLeaseDuration() |
String |
getLeaseId()
Gets the lease ID to access the file. |
String |
getProposedLeaseId()
Gets proposed lease id. |
Boolean |
isFlush()
Returns whether file will be flushed after the append. |
Data |
setContentHash(byte[] contentMd5)
This hash is used to verify the integrity of the request content during transport. |
Data |
setFlush(Boolean flush)
If true, the file will be flushed after the append. |
Data |
setLeaseAction(LeaseAction leaseAction)
Get lease action set on file. |
Data |
setLeaseDuration(Integer leaseDurationInSeconds)
Optional. |
Data |
setLeaseId(String leaseId)
Sets the lease ID. |
Data |
setProposedLeaseId(String proposedLeaseId)
Sets the proposed lease id. |
Methods inherited from java.lang.Object
Constructor Details
DataLakeFileAppendOptions
public DataLakeFileAppendOptions()
Method Details
getContentMd5
public byte[] getContentMd5()
When this header is specified, the storage service compares the hash of the content that has arrived with this header value. If the two hashes do not match, the operation will fail with error code 400 (Bad Request). Note that this MD5 hash is not stored with the file. This header is associated with the request content, and not with the stored content of the file itself.
Returns:
getLeaseAction
public LeaseAction getLeaseAction()
Get lease action set on file. ACQUIRE will attempt to acquire a new lease on the file, with DataLakeFileAppendOptions#proposedLeaseId as the lease ID. ACQUIRE_RELEASE will attempt to aquire a new lease on the file, with DataLakeFileAppendOptions#proposedLeaseId as the lease ID. The lease will be released once the Append operation is complete. AUTO_RENEW will attempt to renew the lease specified by getLeaseId(). RELEASE will attempt to release the least specified by getLeaseId().
Returns:
getLeaseDuration
public Integer getLeaseDuration()
Returns:
getLeaseId
public String getLeaseId()
Gets the lease ID to access the file.
Returns:
getProposedLeaseId
public String getProposedLeaseId()
Gets proposed lease id. Valid with ACQUIRE and ACQUIRE_RELEASE.
Returns:
isFlush
public Boolean isFlush()
Returns whether file will be flushed after the append.
Returns:
setContentHash
public DataLakeFileAppendOptions setContentHash(byte[] contentMd5)
This hash is used to verify the integrity of the request content during transport. When this header is specified, the storage service compares the hash of the content that has arrived with this header value. If the two hashes do not match, the operation will fail with error code 400 (Bad Request). Note that this MD5 hash is not stored with the file. This header is associated with the request content, and not with the stored content of the file itself.
Parameters:
Returns:
setFlush
public DataLakeFileAppendOptions setFlush(Boolean flush)
If true, the file will be flushed after the append.
Parameters:
Returns:
setLeaseAction
public DataLakeFileAppendOptions setLeaseAction(LeaseAction leaseAction)
Get lease action set on file. ACQUIRE will attempt to acquire a new lease on the file, with DataLakeFileAppendOptions#proposedLeaseId as the lease ID. ACQUIRE_RELEASE will attempt to aquire a new lease on the file, with DataLakeFileAppendOptions#proposedLeaseId as the lease ID. The lease will be released once the Append operation is complete. AUTO_RENEW will attempt to renew the lease specified by getLeaseId(). RELEASE will attempt to release the least specified by getLeaseId().
Parameters:
Returns:
setLeaseDuration
public DataLakeFileAppendOptions setLeaseDuration(Integer leaseDurationInSeconds)
Optional. Specifies the duration of the lease, in seconds, or specify -1 for a lease that never expires. A non-infinite lease can be between 15 and 60 seconds. Sets the lease duration.
Parameters:
Returns:
setLeaseId
public DataLakeFileAppendOptions setLeaseId(String leaseId)
Sets the lease ID.
Parameters:
Returns:
setProposedLeaseId
public DataLakeFileAppendOptions setProposedLeaseId(String proposedLeaseId)
Sets the proposed lease id. Valid with ACQUIRE and ACQUIRE_RELEASE.
Parameters:
Returns: