Module org.elasticsearch.server
Record Class DataStreamOptions
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.metadata.DataStreamOptions
- All Implemented Interfaces:
Diffable<DataStreamOptions>,SimpleDiffable<DataStreamOptions>,Writeable,ToXContent,ToXContentObject
public record DataStreamOptions(DataStreamFailureStore failureStore)
extends Record
implements SimpleDiffable<DataStreamOptions>, ToXContentObject
Holds data stream dedicated configuration options such as failure store, (in the future lifecycle). Currently, it
supports the following configurations:
- failure store
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordThis class is only used in template configuration.Nested classes/interfaces inherited from interface org.elasticsearch.cluster.SimpleDiffable
SimpleDiffable.CompleteDiff<T extends Diffable<T>>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 DataStreamOptionsstatic final DataStreamOptionsstatic final DataStreamOptionsstatic final ParseFieldstatic final ConstructingObjectParser<DataStreamOptions, Void> Fields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionDataStreamOptions(DataStreamFailureStore failureStore) Creates an instance of aDataStreamOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefailureStorerecord component.static DataStreamOptionsfromXContent(XContentParser parser) final inthashCode()Returns a hash code value for this object.booleanisEmpty()static DataStreamOptionsread(StreamInput in) static Diff<DataStreamOptions> toString()Returns a string representation of this record class.toXContent(XContentBuilder builder, ToXContent.Params params) 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.cluster.SimpleDiffable
diffMethods inherited from interface org.elasticsearch.xcontent.ToXContentObject
isFragment
-
Field Details
-
FAILURE_STORE_FIELD
-
FAILURE_STORE_ENABLED
-
FAILURE_STORE_DISABLED
-
EMPTY
-
PARSER
-
-
Constructor Details
-
DataStreamOptions
Creates an instance of aDataStreamOptionsrecord class.- Parameters:
failureStore- the value for thefailureStorerecord component
-
-
Method Details
-
read
- Throws:
IOException
-
readDiffFrom
- Throws:
IOException
-
isEmpty
public boolean isEmpty()- Returns:
- true if none of the options are defined
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- 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. -
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
fromXContent
- Throws:
IOException
-
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
-