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.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.xcontent.ToXContent
ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final DataStreamOptions.Templatestatic final ConstructingObjectParser<DataStreamOptions.Template, Void> Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionTemplate(DataStreamFailureStore.Template template) Template(ResettableValue<DataStreamFailureStore.Template> failureStore) Creates an instance of aTemplaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureStorerecord component.static DataStreamOptions.TemplatefromXContent(XContentParser parser) final inthashCode()Returns a hash code value for this object.static DataStreamOptions.Templateread(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.voidwriteTo(StreamOutput out) Write this into the StreamOutput.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
EMPTY
-
PARSER
-
-
Constructor Details
-
Template
-
Template
Creates an instance of aTemplaterecord class.- Parameters:
failureStore- the value for thefailureStorerecord component
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin 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:
toXContentin interfaceToXContent- Throws:
IOException
-
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 thefailureStorerecord component.- Returns:
- the value of the
failureStorerecord component
-