Module org.elasticsearch.server
Package org.elasticsearch.index.translog
Record Class Translog.Location
java.lang.Object
java.lang.Record
org.elasticsearch.index.translog.Translog.Location
- All Implemented Interfaces:
Comparable<Translog.Location>
- Enclosing class:
Translog
public static record Translog.Location(long generation, long translogLocation, int size)
extends Record
implements Comparable<Translog.Location>
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionLocation
(long generation, long translogLocation, int size) Creates an instance of aLocation
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
final boolean
Indicates whether some other object is "equal to" this one.long
Returns the value of thegeneration
record component.final int
hashCode()
Returns a hash code value for this object.int
size()
Returns the value of thesize
record component.toString()
Returns a string representation of this record class.long
Returns the value of thetranslogLocation
record component.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
Location
public Location(long generation, long translogLocation, int size) Creates an instance of aLocation
record class.- Parameters:
generation
- the value for thegeneration
record componenttranslogLocation
- the value for thetranslogLocation
record componentsize
- the value for thesize
record 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. -
compareTo
- Specified by:
compareTo
in interfaceComparable<Translog.Location>
-
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 with '=='. -
generation
public long generation()Returns the value of thegeneration
record component.- Returns:
- the value of the
generation
record component
-
translogLocation
public long translogLocation()Returns the value of thetranslogLocation
record component.- Returns:
- the value of the
translogLocation
record component
-
size
public int size()Returns the value of thesize
record component.- Returns:
- the value of the
size
record component
-