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 aDataStreamGlobalRetentionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic DataStreamGlobalRetentionHelper method that creates a global retention object or returns null in case both retentions are nullReturns the value of thedefaultRetentionrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of themaxRetentionrecord component.static DataStreamGlobalRetentionread(StreamInput in) toString()Returns a string representation of this record class.voidwriteTo(StreamOutput out) Write this into the StreamOutput.
-
Field Details
-
MIN_RETENTION_VALUE
-
-
Constructor Details
-
DataStreamGlobalRetention
Creates an instance of aDataStreamGlobalRetentionrecord class.- Parameters:
defaultRetention- the value for thedefaultRetentionrecord componentmaxRetention- the value for themaxRetentionrecord component
-
-
Method Details
-
create
@Nullable public static DataStreamGlobalRetention create(@Nullable TimeValue defaultRetention, @Nullable TimeValue maxRetention) Helper method that creates a global retention object or returns null in case both retentions are null -
read
- Throws:
IOException
-
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. -
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 thedefaultRetentionrecord component.- Returns:
- the value of the
defaultRetentionrecord component
-
maxRetention
Returns the value of themaxRetentionrecord component.- Returns:
- the value of the
maxRetentionrecord component
-