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 aLocationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintfinal booleanIndicates whether some other object is "equal to" this one.longReturns the value of thegenerationrecord component.final inthashCode()Returns a hash code value for this object.intsize()Returns the value of thesizerecord component.toString()Returns a string representation of this record class.longReturns the value of thetranslogLocationrecord component.
-
Field Details
-
EMPTY
-
-
Constructor Details
-
Location
public Location(long generation, long translogLocation, int size) Creates an instance of aLocationrecord class.- Parameters:
generation- the value for thegenerationrecord componenttranslogLocation- the value for thetranslogLocationrecord componentsize- the value for thesizerecord 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:
compareToin 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 thegenerationrecord component.- Returns:
- the value of the
generationrecord component
-
translogLocation
public long translogLocation()Returns the value of thetranslogLocationrecord component.- Returns:
- the value of the
translogLocationrecord component
-
size
public int size()Returns the value of thesizerecord component.- Returns:
- the value of the
sizerecord component
-