Class DataLakeFileFlushOptions
java.lang.Object
com.azure.storage.file.datalake.options.DataLakeFileFlushOptions
Optional parameters for appending data to a file when calling flush() on
DataLakeFileClient
and
DataLakeFileAsyncClient
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet lease action set on file.Gets the lease duration in seconds.Optional standard HTTP header properties for the file.Gets proposed lease id.OptionalDataLakeRequestConditions
conditions that are set on the flush of this file.isClose()
Azure Storage Events allow applications to receive notifications when files change.If "true", uncommitted data is retained after the flush operation completes; otherwise, the uncommitted data is deleted after the flush operation.Sets whether file stream has been closed.setLeaseAction
(LeaseAction leaseAction) Get lease action set on file.setLeaseDuration
(Integer leaseDurationInSeconds) Sets the lease duration.setPathHttpHeaders
(PathHttpHeaders pathHttpHeaders) Optional standard HTTP header properties that can be set for the file.setProposedLeaseId
(String proposedLeaseId) Sets the proposed lease id.setRequestConditions
(DataLakeRequestConditions requestConditions) OptionalDataLakeRequestConditions
conditions to add on the flush of this file.setUncommittedDataRetained
(Boolean retainUncommittedData) Sets whether uncommitted data should be retained.
-
Constructor Details
-
DataLakeFileFlushOptions
public DataLakeFileFlushOptions()Creates a new instance ofDataLakeFileFlushOptions
.
-
-
Method Details
-
isUncommittedDataRetained
If "true", uncommitted data is retained after the flush operation completes; otherwise, the uncommitted data is deleted after the flush operation. The default is false. Data at offsets less than the specified position are written to the file when flush succeeds, but this optional parameter allows data after the flush position to be retained for a future flush operation.- Returns:
- whether to retain uncommitted data.
-
setUncommittedDataRetained
Sets whether uncommitted data should be retained. If "true", uncommitted data is retained after the flush operation completes; otherwise, the uncommitted data is deleted after the flush operation. The default is false. Data at offsets less than the specified position are written to the file when flush succeeds, but this optional parameter allows data after the flush position to be retained for a future flush operation.- Parameters:
retainUncommittedData
- boolean flag to indicate whether uncommitted data should be retained.- Returns:
- the updated DataLakeFileFlushOptions object.
-
isClose
Azure Storage Events allow applications to receive notifications when files change. When Azure Storage Events are enabled, a file changed event is raised. This event has a property indicating whether this is the final change to distinguish the difference between an intermediate flush to a file stream and the final close of a file stream. The close query parameter is valid only when the action is "flush" and change notifications are enabled. If the value of close is "true" and the flush operation completes successfully, the service raises a file change notification with a property indicating that this is the final update (the file stream has been closed). If "false" a change notification is raised indicating the file has changed. The default is false. This query parameter is set to true by the Hadoop ABFS driver to indicate that the file stream has been closed.- Returns:
- whether the file stream has been closed.
-
setClose
Sets whether file stream has been closed. Azure Storage Events allow applications to receive notifications when files change. When Azure Storage Events are enabled, a file changed event is raised. This event has a property indicating whether this is the final change to distinguish the difference between an intermediate flush to a file stream and the final close of a file stream. The close query parameter is valid only when the action is "flush" and change notifications are enabled. If the value of close is "true" and the flush operation completes successfully, the service raises a file change notification with a property indicating that this is the final update (the file stream has been closed). If "false" a change notification is raised indicating the file has changed. The default is false. This query parameter is set to true by the Hadoop ABFS driver to indicate that the file stream has been closed.- Parameters:
close
- boolean flag to indicate whether file stream has been closed.- Returns:
- the updated DataLakeFileFlushOptions object.
-
getPathHttpHeaders
Optional standard HTTP header properties for the file.- Returns:
- the
PathHttpHeaders
for this file.
-
setPathHttpHeaders
Optional standard HTTP header properties that can be set for the file.- Parameters:
pathHttpHeaders
-PathHttpHeaders
to be set for this file.- Returns:
- the updated DataLakeFileFlushOptions object.
-
getRequestConditions
OptionalDataLakeRequestConditions
conditions that are set on the flush of this file.- Returns:
DataLakeRequestConditions
for this file.
-
setRequestConditions
OptionalDataLakeRequestConditions
conditions to add on the flush of this file.- Parameters:
requestConditions
-DataLakeRequestConditions
to set on this file.- Returns:
- the updated DataLakeFileFlushOptions object.
-
getLeaseAction
Get lease action set on file.LeaseAction.ACQUIRE
will attempt to acquire a new lease on the file, withproposedLeaseId
as the lease ID.LeaseAction.ACQUIRE_RELEASE
will attempt to acquire a new lease on the file, withproposedLeaseId
as the lease ID. The lease will be released once the Append operation is complete.LeaseAction.AUTO_RENEW
will attempt to renew the lease specified byDataLakeRequestConditions.getLeaseId()
.LeaseAction.RELEASE
will attempt to release the least specified byDataLakeRequestConditions.getLeaseId()
.- Returns:
- The
LeaseAction
set on the file.
-
setLeaseAction
Get lease action set on file.LeaseAction.ACQUIRE
will attempt to acquire a new lease on the file, withproposedLeaseId
as the lease ID.LeaseAction.ACQUIRE_RELEASE
will attempt to acquire a new lease on the file, withproposedLeaseId
as the lease ID. The lease will be released once the Append operation is complete.LeaseAction.AUTO_RENEW
will attempt to renew the lease specified byDataLakeRequestConditions.getLeaseId()
.LeaseAction.RELEASE
will attempt to release the least specified byDataLakeRequestConditions.getLeaseId()
.- Parameters:
leaseAction
- theLeaseAction
to set on the file.- Returns:
- the updated DataLakeFileFlushOptions object.
-
getLeaseDuration
Gets the lease duration in seconds.- Returns:
- the lease duration in seconds.
-
setLeaseDuration
Sets the lease duration. 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.- Parameters:
leaseDurationInSeconds
- the new lease duration.- Returns:
- the updated DataLakeFileFlushOptions object.
-
getProposedLeaseId
Gets proposed lease id. Valid withLeaseAction.ACQUIRE
andLeaseAction.ACQUIRE_RELEASE
.- Returns:
- the proposed lease id.
-
setProposedLeaseId
Sets the proposed lease id. Valid withLeaseAction.ACQUIRE
andLeaseAction.ACQUIRE_RELEASE
.- Parameters:
proposedLeaseId
- the proposed lease id to set.- Returns:
- the updated DataLakeFileFlushOptions object.
-