4
4
5
5
namespace Nest
6
6
{
7
+ /// <summary>
8
+ /// A snapshot repository that uses a shared file system to store snapshot data.
9
+ /// The path specified in the location parameter should point to the same location in the shared
10
+ /// filesystem and be accessible on all data and master nodes.
11
+ /// </summary>
7
12
public interface IFileSystemRepository : IRepository < IFileSystemRepositorySettings > { }
8
13
14
+ /// <inheritdoc />
9
15
public class FileSystemRepository : IFileSystemRepository
10
16
{
11
17
public FileSystemRepository ( FileSystemRepositorySettings settings ) => Settings = settings ;
@@ -15,29 +21,53 @@ public class FileSystemRepository : IFileSystemRepository
15
21
public string Type { get ; } = "fs" ;
16
22
}
17
23
24
+ /// <summary>
25
+ /// Repository settings for <see cref="IFileSystemRepository"/>
26
+ /// </summary>
18
27
public interface IFileSystemRepositorySettings : IRepositorySettings
19
28
{
29
+ /// <summary>
30
+ /// Big files can be broken down into chunks during the snapshot process, if needed.
31
+ /// The chunk size can be specified in bytes or by using size value notation, i.e. 1g, 10m, 5k.
32
+ /// Defaults to null (unlimited chunk size).
33
+ /// </summary>
20
34
[ DataMember ( Name = "chunk_size" ) ]
21
35
string ChunkSize { get ; set ; }
22
36
37
+ /// <summary>
38
+ /// Turns on compression of the snapshot files. Defaults to true.
39
+ /// </summary>
23
40
[ DataMember ( Name = "compress" ) ]
24
41
[ JsonFormatter ( typeof ( NullableStringBooleanFormatter ) ) ]
25
42
bool ? Compress { get ; set ; }
26
43
44
+ /// <summary>
45
+ /// Throttles the number of streams (per node) preforming snapshot operation. Defaults to 5
46
+ /// </summary>
27
47
[ DataMember ( Name = "concurrent_streams" ) ]
28
48
[ JsonFormatter ( typeof ( NullableStringIntFormatter ) ) ]
29
49
int ? ConcurrentStreams { get ; set ; }
30
50
51
+ /// <summary>
52
+ /// Location of the snapshots. Mandatory.
53
+ /// </summary>
31
54
[ DataMember ( Name = "location" ) ]
32
55
string Location { get ; set ; }
33
56
57
+ /// <summary>
58
+ /// Throttles per node restore rate. Defaults to 20mb per second.
59
+ /// </summary>
34
60
[ DataMember ( Name = "max_restore_bytes_per_second" ) ]
35
61
string RestoreBytesPerSecondMaximum { get ; set ; }
36
62
63
+ /// <summary>
64
+ /// Throttles per node snapshot rate. Defaults to 20mb per second.
65
+ /// </summary>
37
66
[ DataMember ( Name = "max_snapshot_bytes_per_second" ) ]
38
67
string SnapshotBytesPerSecondMaximum { get ; set ; }
39
68
}
40
69
70
+ /// <inheritdoc cref="IFileSystemRepositorySettings"/>
41
71
public class FileSystemRepositorySettings : IFileSystemRepositorySettings
42
72
{
43
73
internal FileSystemRepositorySettings ( ) { }
@@ -57,6 +87,7 @@ internal FileSystemRepositorySettings() { }
57
87
public string SnapshotBytesPerSecondMaximum { get ; set ; }
58
88
}
59
89
90
+ /// <inheritdoc cref="IFileSystemRepositorySettings"/>
60
91
public class FileSystemRepositorySettingsDescriptor
61
92
: DescriptorBase < FileSystemRepositorySettingsDescriptor , IFileSystemRepositorySettings > , IFileSystemRepositorySettings
62
93
{
@@ -67,55 +98,37 @@ public class FileSystemRepositorySettingsDescriptor
67
98
string IFileSystemRepositorySettings . RestoreBytesPerSecondMaximum { get ; set ; }
68
99
string IFileSystemRepositorySettings . SnapshotBytesPerSecondMaximum { get ; set ; }
69
100
70
- /// <summary>
71
- /// Location of the snapshots. Mandatory.
72
- /// </summary>
73
- /// <param name="location"></param>
101
+ /// <inheritdoc cref="IFileSystemRepositorySettings.Location"/>
74
102
public FileSystemRepositorySettingsDescriptor Location ( string location ) => Assign ( location , ( a , v ) => a . Location = v ) ;
75
103
76
- /// <summary>
77
- /// Turns on compression of the snapshot files. Defaults to true.
78
- /// </summary>
79
- /// <param name="compress"></param>
104
+ /// <inheritdoc cref="IFileSystemRepositorySettings.Compress"/>
80
105
public FileSystemRepositorySettingsDescriptor Compress ( bool ? compress = true ) => Assign ( compress , ( a , v ) => a . Compress = v ) ;
81
106
82
- /// <summary>
83
- /// Throttles the number of streams (per node) preforming snapshot operation. Defaults to 5
84
- /// </summary>
85
- /// <param name="concurrentStreams"></param>
107
+ /// <inheritdoc cref="IFileSystemRepositorySettings.ConcurrentStreams"/>
86
108
public FileSystemRepositorySettingsDescriptor ConcurrentStreams ( int ? concurrentStreams ) =>
87
109
Assign ( concurrentStreams , ( a , v ) => a . ConcurrentStreams = v ) ;
88
110
89
- /// <summary>
90
- /// Big files can be broken down into chunks during snapshotting if needed.
91
- /// The chunk size can be specified in bytes or by using size value notation, i.e. 1g, 10m, 5k.
92
- /// Defaults to null (unlimited chunk size).
93
- /// </summary>
94
- /// <param name="chunkSize"></param>
111
+ /// <inheritdoc cref="IFileSystemRepositorySettings.ChunkSize"/>
95
112
public FileSystemRepositorySettingsDescriptor ChunkSize ( string chunkSize ) => Assign ( chunkSize , ( a , v ) => a . ChunkSize = v ) ;
96
113
97
- /// <summary>
98
- /// Throttles per node restore rate. Defaults to 20mb per second.
99
- /// </summary>
100
- /// <param name="maximumBytesPerSecond"></param>
114
+ /// <inheritdoc cref="IFileSystemRepositorySettings.RestoreBytesPerSecondMaximum"/>
101
115
public FileSystemRepositorySettingsDescriptor RestoreBytesPerSecondMaximum ( string maximumBytesPerSecond ) =>
102
116
Assign ( maximumBytesPerSecond , ( a , v ) => a . RestoreBytesPerSecondMaximum = v ) ;
103
117
104
- /// <summary>
105
- /// Throttles per node snapshot rate. Defaults to 20mb per second.
106
- /// </summary>
107
- /// <param name="maximumBytesPerSecond"></param>
118
+ /// <inheritdoc cref="IFileSystemRepositorySettings.SnapshotBytesPerSecondMaximum"/>
108
119
public FileSystemRepositorySettingsDescriptor SnapshotBytesPerSecondMaximum ( string maximumBytesPerSecond ) =>
109
120
Assign ( maximumBytesPerSecond , ( a , v ) => a . SnapshotBytesPerSecondMaximum = v ) ;
110
121
}
111
122
123
+ /// <inheritdoc cref="IFileSystemRepository"/>
112
124
public class FileSystemRepositoryDescriptor
113
125
: DescriptorBase < FileSystemRepositoryDescriptor , IFileSystemRepository > , IFileSystemRepository
114
126
{
115
127
IFileSystemRepositorySettings IRepository < IFileSystemRepositorySettings > . Settings { get ; set ; }
116
128
object IRepositoryWithSettings . DelegateSettings => Self . Settings ;
117
129
string ISnapshotRepository . Type { get ; } = "fs" ;
118
130
131
+ /// <inheritdoc cref="IFileSystemRepositorySettings"/>
119
132
public FileSystemRepositoryDescriptor Settings ( string location ,
120
133
Func < FileSystemRepositorySettingsDescriptor , IFileSystemRepositorySettings > settingsSelector = null
121
134
) =>
0 commit comments