Class PackedLongsPostingList

java.lang.Object
org.apache.cassandra.index.sai.disk.v1.postings.PackedLongsPostingList
All Implemented Interfaces:
Closeable, AutoCloseable, PostingList

public class PackedLongsPostingList extends Object implements PostingList
Adapter class for PackedLongValues to expose it as PostingList.
  • Constructor Details

    • PackedLongsPostingList

      public PackedLongsPostingList(org.apache.lucene.util.packed.PackedLongValues values)
  • Method Details

    • nextPosting

      public long nextPosting()
      Description copied from interface: PostingList
      Retrieves the next segment row ID, not including row IDs that have been returned by PostingList.advance(long).
      Specified by:
      nextPosting in interface PostingList
      Returns:
      next segment row ID
    • size

      public long size()
      Description copied from interface: PostingList
      Returns the upper bound of postings in the list. During a merge individual postings may be de-duplicated, so we can't return the exact size only the upper bound of the size.
      Specified by:
      size in interface PostingList
    • advance

      public long advance(long targetRowID)
      Description copied from interface: PostingList
      Advances to the first row ID beyond the current that is greater than or equal to the target, and returns that row ID. Exhausts the iterator and returns PostingList.END_OF_STREAM if the target is greater than the highest row ID.

      Note: Callers must use the return value of this method before calling PostingList.nextPosting(), as calling that method will return the next posting, not the one to which we have just advanced.

      Specified by:
      advance in interface PostingList
      Parameters:
      targetRowID - target row ID to advance to
      Returns:
      first segment row ID which is >= the target row ID or PostingList.END_OF_STREAM if one does not exist