Package com.yahoo.documentapi
Record Class ProgressToken.BucketKeyWrapper
java.lang.Object
java.lang.Record
com.yahoo.documentapi.ProgressToken.BucketKeyWrapper
- All Implemented Interfaces:
Comparable<ProgressToken.BucketKeyWrapper>
- Enclosing class:
- ProgressToken
public static record ProgressToken.BucketKeyWrapper(long key)
extends Record
implements Comparable<ProgressToken.BucketKeyWrapper>
For consistent bucket key ordering, we need to ensure that reverse bucket
IDs that have their MSB set actually are compared as being greater than
those that don't. This is yet another issue caused by Java's lack of
unsigned integers.
-
Constructor Summary
ConstructorsConstructorDescriptionBucketKeyWrapper(long key) Creates an instance of aBucketKeyWrapperrecord class. -
Method Summary
Modifier and TypeMethodDescriptionintbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.longkey()Returns the value of thekeyrecord component.com.yahoo.document.BucketIdtoString()Returns a string representation of this record class.
-
Constructor Details
-
BucketKeyWrapper
public BucketKeyWrapper(long key) Creates an instance of aBucketKeyWrapperrecord class.- Parameters:
key- the value for thekeyrecord component
-
-
Method Details
-
compareTo
- Specified by:
compareToin interfaceComparable<ProgressToken.BucketKeyWrapper>
-
toBucketId
public com.yahoo.document.BucketId toBucketId() -
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. -
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 '=='. -
hashCode
public int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
key
public long key()Returns the value of thekeyrecord component.- Returns:
- the value of the
keyrecord component
-