Class IntArrayPostingList

java.lang.Object
org.apache.cassandra.index.sai.postings.IntArrayPostingList
All Implemented Interfaces:
Closeable, AutoCloseable, OrdinalPostingList, PostingList

public class IntArrayPostingList extends Object implements OrdinalPostingList
  • Constructor Details

    • IntArrayPostingList

      public IntArrayPostingList(int[] postings)
  • Method Details

    • getOrdinal

      public long getOrdinal()
      Specified by:
      getOrdinal in interface OrdinalPostingList
      Returns:
      the ordinal of the posting that will be returned on the next call to PostingList.nextPosting()
    • 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
    • toString

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

      public int getPostingAt(int i)