Class PostingList.EmptyPostingList
java.lang.Object
org.apache.cassandra.index.sai.postings.PostingList.EmptyPostingList
- All Implemented Interfaces:
Closeable,AutoCloseable,PostingList
- Enclosing interface:
- PostingList
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.cassandra.index.sai.postings.PostingList
PostingList.EmptyPostingList -
Field Summary
Fields inherited from interface org.apache.cassandra.index.sai.postings.PostingList
EMPTY, END_OF_STREAM, OFFSET_NOT_FOUND -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongadvance(long targetRowID) Advances to the first row ID beyond the current that is greater than or equal to the target, and returns that row ID.longRetrieves the next segment row ID, not including row IDs that have been returned byPostingList.advance(long).longsize()Returns the upper bound of postings in the list.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.apache.cassandra.index.sai.postings.PostingList
close, maximum, minimum
-
Constructor Details
-
EmptyPostingList
public EmptyPostingList()
-
-
Method Details
-
nextPosting
Description copied from interface:PostingListRetrieves the next segment row ID, not including row IDs that have been returned byPostingList.advance(long).- Specified by:
nextPostingin interfacePostingList- Returns:
- next segment row ID
- Throws:
IOException
-
size
public long size()Description copied from interface:PostingListReturns 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:
sizein interfacePostingList
-
advance
Description copied from interface:PostingListAdvances 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 returnsPostingList.END_OF_STREAMif 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:
advancein interfacePostingList- Parameters:
targetRowID- target row ID to advance to- Returns:
- first segment row ID which is >= the target row ID or
PostingList.END_OF_STREAMif one does not exist - Throws:
IOException
-