Module org.elasticsearch.server
Record Class ReservedStateErrorMetadata
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.metadata.ReservedStateErrorMetadata
- All Implemented Interfaces:
Diffable<ReservedStateErrorMetadata>,SimpleDiffable<ReservedStateErrorMetadata>,Writeable,ToXContent,ToXContentFragment
public record ReservedStateErrorMetadata(Long version, ReservedStateErrorMetadata.ErrorKind errorKind, List<String> errors)
extends Record
implements SimpleDiffable<ReservedStateErrorMetadata>, ToXContentFragment
A metadata class to hold error information about errors encountered
while applying a cluster state update for a given namespace.
This information is held by the ReservedStateMetadata class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumEnum for kinds of errors we might encounter while processing reserved cluster state updates.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
Fields inherited from interface org.elasticsearch.cluster.SimpleDiffable
EMPTYFields inherited from interface org.elasticsearch.xcontent.ToXContent
EMPTY, EMPTY_PARAMS -
Constructor Summary
ConstructorsConstructorDescriptionReservedStateErrorMetadata(Long version, ReservedStateErrorMetadata.ErrorKind errorKind, List<String> errors) Constructs a reserved state error metadata -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of theerrorKindrecord component.errors()Returns the value of theerrorsrecord component.static ReservedStateErrorMetadatafromXContent(XContentParser parser) Reads anReservedStateErrorMetadatafrom xContentfinal inthashCode()Returns a hash code value for this object.static Diff<ReservedStateErrorMetadata> static ReservedStateErrorMetadatareadFrom(StreamInput in) Reads anReservedStateErrorMetadatafrom aStreamInputfinal StringtoString()Returns a string representation of this record class.toXContent(XContentBuilder builder, ToXContent.Params params) version()Returns the value of theversionrecord component.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.ToXContentFragment
isFragment
-
Constructor Details
-
ReservedStateErrorMetadata
public ReservedStateErrorMetadata(Long version, ReservedStateErrorMetadata.ErrorKind errorKind, List<String> errors) Constructs a reserved state error metadata- Parameters:
version- the metadata version of the content which failed to applyerrorKind- the kind of error we encountered while processingerrors- the list of errors encountered during parsing and validation of the reserved state content
-
-
Method Details
-
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Throws:
IOException
-
readFrom
Reads anReservedStateErrorMetadatafrom aStreamInput- Parameters:
in- theStreamInputto read from- Returns:
ReservedStateErrorMetadata- Throws:
IOException
-
toXContent
public XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws IOException - Specified by:
toXContentin interfaceToXContent- Throws:
IOException
-
fromXContent
Reads anReservedStateErrorMetadatafrom xContent- Parameters:
parser-XContentParser- Returns:
ReservedStateErrorMetadata
-
readDiffFrom
- Parameters:
in- theStreamInputto read the diff from- Returns:
- a
DiffofReservedStateErrorMetadata - 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). -
version
Returns the value of theversionrecord component.- Returns:
- the value of the
versionrecord component
-
errorKind
Returns the value of theerrorKindrecord component.- Returns:
- the value of the
errorKindrecord component
-
errors
Returns the value of theerrorsrecord component.- Returns:
- the value of the
errorsrecord component
-