Record Class Versioned<T>
java.lang.Object
java.lang.Record
org.elasticsearch.xpack.esql.session.Versioned<T>
A wrapper for objects to pass along the minimum transport version available in the cluster (and remotes),
esp. when dealing with listeners. Where this object gets consumed, we generally need to assume that all nodes in the cluster
(and remotes) are at the minimum transport version, so that we don't use features not supported everywhere.
-
Constructor Summary
ConstructorsConstructorDescriptionVersioned(T inner, TransportVersion minimumVersion) Creates an instance of aVersionedrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inner()Returns the value of theinnerrecord component.Returns the value of theminimumVersionrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Versioned
Creates an instance of aVersionedrecord class.- Parameters:
inner- the value for theinnerrecord componentminimumVersion- the value for theminimumVersionrecord component
-
-
Method Details
-
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). -
inner
Returns the value of theinnerrecord component.- Returns:
- the value of the
innerrecord component
-
minimumVersion
Returns the value of theminimumVersionrecord component.- Returns:
- the value of the
minimumVersionrecord component
-