public class SliceQueryPager extends java.lang.Object implements SinglePartitionPager
Modifier and Type | Field and Description |
---|---|
protected CFMetaData |
cfm |
protected IDiskAtomFilter |
columnFilter |
Modifier and Type | Method and Description |
---|---|
ColumnCounter |
columnCounter() |
protected boolean |
containsPreviousLast(Row first)
Checks to see if the first row of a new page contains the last row from the previous page.
|
protected java.util.List<Row> |
discardFirst(java.util.List<Row> rows) |
java.util.List<Row> |
fetchPage(int pageSize)
Fetches the next page.
|
protected Cell |
firstNonStaticCell(ColumnFamily cf)
Returns the first non-static cell in the ColumnFamily.
|
boolean |
isExhausted()
Whether or not this pager is exhausted, i.e.
|
protected boolean |
isReversed() |
java.nio.ByteBuffer |
key() |
protected static Cell |
lastCell(ColumnFamily cf) |
int |
maxRemaining()
The maximum number of cells/CQL3 row that we may still have to return.
|
protected java.util.List<Row> |
queryNextPage(int pageSize,
ConsistencyLevel consistencyLevel,
boolean localQuery) |
protected boolean |
recordLast(Row last)
Saves the paging state by recording the last seen partition key and cell name (where applicable).
|
protected void |
restoreState(int remaining,
boolean shouldFetchExtraRow) |
PagingState |
state()
Get the current state of the pager.
|
long |
timestamp() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
columnCounter
fetchPage, isExhausted, maxRemaining
protected final CFMetaData cfm
protected final IDiskAtomFilter columnFilter
public java.nio.ByteBuffer key()
key
in interface SinglePartitionPager
public PagingState state()
QueryPager
state
in interface QueryPager
protected java.util.List<Row> queryNextPage(int pageSize, ConsistencyLevel consistencyLevel, boolean localQuery) throws RequestValidationException, RequestExecutionException
protected boolean containsPreviousLast(Row first)
first
- the first row of the new pagefirst
contains the last from from the previous page and it is live, false otherwiseprotected boolean recordLast(Row last)
last
- the last row in the current pageprotected boolean isReversed()
public java.util.List<Row> fetchPage(int pageSize) throws RequestValidationException, RequestExecutionException
QueryPager
fetchPage
in interface QueryPager
pageSize
- the maximum number of elements to return in the next page.RequestValidationException
RequestExecutionException
protected void restoreState(int remaining, boolean shouldFetchExtraRow)
public boolean isExhausted()
QueryPager
isExhausted
in interface QueryPager
public int maxRemaining()
QueryPager
maxRemaining
in interface QueryPager
public long timestamp()
public ColumnCounter columnCounter()
protected Cell firstNonStaticCell(ColumnFamily cf)
protected static Cell lastCell(ColumnFamily cf)
Copyright © 2020 The Apache Software Foundation