Module org.elasticsearch.server
Record Class DataStreamOptions.Template
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.metadata.DataStreamOptions.Template
- All Implemented Interfaces:
Writeable
,ToXContent
,ToXContentObject
- Enclosing class:
DataStreamOptions
public static record DataStreamOptions.Template(ResettableValue<DataStreamFailureStore.Template> failureStore)
extends Record
implements Writeable, ToXContentObject
This class is only used in template configuration. It wraps the fields of
DataStreamOptions
with ResettableValue
to allow a user to signal when they want to reset any previously encountered values during template composition. Furthermore, it
provides the DataStreamOptions.Template.Builder
that dictates how two templates can be composed.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic class
Builds and composes a data stream template.Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DataStreamOptions.Template
static final ConstructingObjectParser
<DataStreamOptions.Template, Void> Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS
-
Constructor Summary
ConstructorsConstructorDescriptionTemplate
(ResettableValue<DataStreamFailureStore.Template> failureStore) Creates an instance of aTemplate
record class. -
Method Summary
Modifier and TypeMethodDescriptionbuilder
(DataStreamOptions.Template template) final boolean
Indicates whether some other object is "equal to" this one.Returns the value of thefailureStore
record component.static DataStreamOptions.Template
fromXContent
(XContentParser parser) final int
hashCode()
Returns a hash code value for this object.static DataStreamOptions.Template
read
(StreamInput in) toString()
Returns a string representation of this record class.toXContent
(XContentBuilder builder, ToXContent.Params params) Converts the template to XContent, depending on the set byResettableValue.hideResetValues(Params)
it may or may not display any explicit nulls when the value is to be reset.void
writeTo
(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
EMPTY
-
PARSER
-
-
Constructor Details
-
Template
Creates an instance of aTemplate
record class.- Parameters:
failureStore
- the value for thefailureStore
record component
-
-
Method Details
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in interfaceWriteable
- Throws:
IOException
-
read
- Throws:
IOException
-
fromXContent
- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException Converts the template to XContent, depending on the set byResettableValue.hideResetValues(Params)
it may or may not display any explicit nulls when the value is to be reset.- Specified by:
toXContent
in interfaceToXContent
- Throws:
IOException
-
toDataStreamOptions
-
builder
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object)
. -
failureStore
Returns the value of thefailureStore
record component.- Returns:
- the value of the
failureStore
record component
-