/
DataLakeFileFlushOptions.cs
65 lines (57 loc) · 3.66 KB
/
DataLakeFileFlushOptions.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
using System;
namespace Azure.Storage.Files.DataLake.Models
{
/// <summary>
/// Optional parameters for appending data to a file with DataLakeFileClient.Flush() and .FlushAsync().
/// </summary>
public class DataLakeFileFlushOptions
{
/// <summary>
/// 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.
/// </summary>
public bool? RetainUncommittedData { get; set; }
/// <summary>
/// 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."
/// </summary>
public bool? Close { get; set; }
/// <summary>
/// Optional standard HTTP header properties that can be set for the file.
/// </summary>
public PathHttpHeaders HttpHeaders { get; set; }
/// <summary>
/// Optional <see cref="DataLakeRequestConditions"/> to add
/// conditions on the flush of this file.
/// </summary>
public DataLakeRequestConditions Conditions { get; set; }
/// <summary>
/// Lease action.
/// <see cref="DataLakeLeaseAction.Acquire"/> will attempt to aquire a new lease on the file, with <see cref="ProposedLeaseId"/> as the lease ID.
/// <see cref="DataLakeLeaseAction.AcquireRelease"/> will attempt to aquire a new lease on the file, with <see cref="ProposedLeaseId"/> as the lease ID. The lease will be released once the Append operation is complete.
/// <see cref="DataLakeLeaseAction.AutoRenew"/> will attempt to renew the lease specified by <see cref="DataLakeRequestConditions.LeaseId"/>.
/// <see cref="DataLakeLeaseAction.Release"/> will attempt to release the least speified by <see cref="DataLakeRequestConditions.LeaseId"/>.
/// </summary>
public DataLakeLeaseAction? LeaseAction { get; set; }
/// <summary>
/// Specifies the duration of the lease, in seconds, or specify
/// <see cref="DataLakeLeaseClient.InfiniteLeaseDuration"/> for a lease that never expires.
/// A non-infinite lease can be between 15 and 60 seconds.
/// </summary>
public TimeSpan? LeaseDuration { get; set; }
/// <summary>
/// Proposed lease ID. Valid with <see cref="DataLakeLeaseAction.Acquire"/> and <see cref="DataLakeLeaseAction.AcquireRelease"/>.
/// </summary>
public string ProposedLeaseId { get; set; }
}
}