File tree Expand file tree Collapse file tree 2 files changed +14
-2
lines changed
server/src/main/java/org/elasticsearch/cluster/metadata Expand file tree Collapse file tree 2 files changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -251,6 +251,10 @@ public Builder enabled(Boolean enabled) {
251251 return this ;
252252 }
253253
254+ /**
255+ * Composes the provided enabled value with the current one. Because enabled is a resettable boolean, if it is defined
256+ * it will overwrite the current value.
257+ */
254258 public Builder enabled (ResettableValue <Boolean > enabled ) {
255259 if (enabled .isDefined ()) {
256260 this .enabled = enabled .get ();
@@ -263,6 +267,11 @@ public Builder lifecycle(DataStreamLifecycle lifecycle) {
263267 return this ;
264268 }
265269
270+ /**
271+ * Composes the provided lifecycle value with the current one. Because lifecycle is a resettable template that can be merged,
272+ * if it is defined it will delegate to {@link DataStreamLifecycle.Builder#composeTemplate(DataStreamLifecycle.Template)} to
273+ * correctly compose the contents.
274+ */
266275 public Builder lifecycle (ResettableValue <DataStreamLifecycle .Template > lifecycle ) {
267276 if (lifecycle .shouldReset ()) {
268277 this .lifecycleBuilder = null ;
@@ -277,6 +286,9 @@ public Builder lifecycle(ResettableValue<DataStreamLifecycle.Template> lifecycle
277286
278287 }
279288
289+ /**
290+ * Composes the provided failure store template with this builder.
291+ */
280292 public Builder composeTemplate (DataStreamFailureStore .Template failureStore ) {
281293 this .enabled (failureStore .enabled ());
282294 this .lifecycle (failureStore .lifecycle ());
Original file line number Diff line number Diff line change @@ -182,15 +182,15 @@ public Builder(DataStreamOptions options) {
182182 }
183183
184184 /**
185- * Updates this builder with the values of the provided template. This is not a replacement necessarily, the
185+ * Composes this builder with the values of the provided template. This is not a replacement necessarily, the
186186 * inner values will be merged.
187187 */
188188 public Builder composeTemplate (DataStreamOptions .Template options ) {
189189 return failureStore (options .failureStore ());
190190 }
191191
192192 /**
193- * Updates the current failure store configuration with the provided value. This is not a replacement necessarily, if both
193+ * Composes the current failure store configuration with the provided value. This is not a replacement necessarily, if both
194194 * instance contain data the configurations are merged.
195195 */
196196 public Builder failureStore (ResettableValue <DataStreamFailureStore .Template > newFailureStore ) {
You can’t perform that action at this time.
0 commit comments