Package com.yahoo.document
Class BucketId
- java.lang.Object
-
- com.yahoo.document.BucketId
-
-
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(java.lang.Object o)
long
getId()
long
getRawId()
int
getUsedBits()
int
hashCode()
java.lang.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(java.lang.String serialized)
-
-
Method Detail
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
compareTo
public int compareTo(BucketId other)
- Specified by:
compareTo
in interfacejava.lang.Comparable<BucketId>
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
getUsedBits
public int getUsedBits()
-
getRawId
public long getRawId()
-
getId
public long getId()
-
withoutCountBits
public long withoutCountBits()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
contains
public boolean contains(BucketId id)
-
contains
public boolean contains(DocumentId docId, BucketIdFactory factory)
-
-