Package com.yahoo.document
Class BucketId
java.lang.Object
com.yahoo.document.BucketId
- All Implemented Interfaces:
Comparable<BucketId>
Representation of a bucket identifier.
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
boolean
boolean
contains
(DocumentId docId, BucketIdFactory factory) boolean
long
getId()
long
getRawId()
int
int
hashCode()
toString()
long
-
Field Details
-
COUNT_BITS
public static final int COUNT_BITS- See Also:
-
-
Constructor Details
-
BucketId
public BucketId()Default-constructed BucketId signifies an invalid bucket ID. -
BucketId
public BucketId(long id) Creates a bucket id with the given raw bucket id. This is a 64 bit mask where the first 6 MSB bits set how many LSB bits should actually be used. Right now it only have simple functionality. More will be added for it to be configurable. -
BucketId
public BucketId(int usedBits, long id) -
BucketId
-
-
Method Details
-
equals
-
compareTo
- Specified by:
compareTo
in interfaceComparable<BucketId>
-
hashCode
public int hashCode() -
getUsedBits
public int getUsedBits() -
getRawId
public long getRawId() -
getId
public long getId() -
withoutCountBits
public long withoutCountBits() -
toString
-
contains
-
contains
-