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 Details

  • 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

      public BucketId(String serialized)
  • Method Details

    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • compareTo

      public int compareTo(BucketId other)
      Specified by:
      compareTo in interface Comparable<BucketId>
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • getUsedBits

      public int getUsedBits()
    • getRawId

      public long getRawId()
    • getId

      public long getId()
    • withoutCountBits

      public long withoutCountBits()
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • contains

      public boolean contains(BucketId id)
    • contains

      public boolean contains(DocumentId docId, BucketIdFactory factory)