Package com.yahoo.document
Class BucketId
- java.lang.Object
-
- com.yahoo.document.BucketId
-
- All Implemented Interfaces:
Comparable<BucketId>
public class BucketId extends Object implements Comparable<BucketId>
Representation of a bucket identifier.
-
-
Field Summary
Fields Modifier and Type Field Description static int
COUNT_BITS
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compareTo(BucketId other)
boolean
contains(BucketId id)
boolean
contains(DocumentId docId, BucketIdFactory factory)
boolean
equals(Object o)
long
getId()
long
getRawId()
int
getUsedBits()
int
hashCode()
String
toString()
long
withoutCountBits()
-
-
-
Field Detail
-
COUNT_BITS
public static final int COUNT_BITS
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
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
public BucketId(String serialized)
-
-
Method Detail
-
compareTo
public int compareTo(BucketId other)
- Specified by:
compareTo
in interfaceComparable<BucketId>
-
getUsedBits
public int getUsedBits()
-
getRawId
public long getRawId()
-
getId
public long getId()
-
withoutCountBits
public long withoutCountBits()
-
contains
public boolean contains(BucketId id)
-
contains
public boolean contains(DocumentId docId, BucketIdFactory factory)
-
-