Module org.elasticsearch.server
Record Class DataStreamGlobalRetention
java.lang.Object
java.lang.Record
org.elasticsearch.cluster.metadata.DataStreamGlobalRetention
- All Implemented Interfaces:
Writeable
public record DataStreamGlobalRetention(TimeValue defaultRetention, TimeValue maxRetention)
extends Record
implements Writeable
Wrapper class for the
DataStreamGlobalRetentionSettings
.-
Nested Class Summary
Nested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDataStreamGlobalRetention
(TimeValue defaultRetention, TimeValue maxRetention) Creates an instance of aDataStreamGlobalRetention
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedefaultRetention
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of themaxRetention
record component.static DataStreamGlobalRetention
read
(StreamInput in) toString()
Returns a string representation of this record class.void
writeTo
(StreamOutput out) Write this into the StreamOutput.
-
Field Details
-
MIN_RETENTION_VALUE
-
-
Constructor Details
-
DataStreamGlobalRetention
Creates an instance of aDataStreamGlobalRetention
record class.- Parameters:
defaultRetention
- the value for thedefaultRetention
record componentmaxRetention
- the value for themaxRetention
record component
-
-
Method Details
-
read
- Throws:
IOException
-
writeTo
Description copied from interface:Writeable
Write this into the StreamOutput.- Specified by:
writeTo
in 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. -
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)
. -
defaultRetention
Returns the value of thedefaultRetention
record component.- Returns:
- the value of the
defaultRetention
record component
-
maxRetention
Returns the value of themaxRetention
record component.- Returns:
- the value of the
maxRetention
record component
-