Package io.datarouter.scanner
Class PagingScanner<K,T>
- All Implemented Interfaces:
Scanner<List<T>>,Closeable,AutoCloseable
Base class for things that page through results by passing the last item as an exclusive start key for the next page
-
Field Summary
FieldsFields inherited from class io.datarouter.scanner.BaseScanner
current -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanadvance()Try to update current to the next item, if there is one.Subclass should transform the last seen item into a key for the next requestMethods inherited from class io.datarouter.scanner.BaseScanner
currentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.datarouter.scanner.Scanner
advanceUntil, advanceWhile, allMatch, anyMatch, append, append, append, apply, batch, close, collate, collate, collect, collect, concat, concatIter, count, deduplicateConsecutive, deduplicateConsecutiveBy, deduplicateConsecutiveBy, distinct, distinctBy, each, exclude, findFirst, findLast, findMax, findMin, flush, forEach, groupBy, groupBy, groupBy, groupBy, hasAny, include, isEmpty, iterable, iterator, limit, link, list, listTo, map, maxN, minN, noneMatch, parallel, prefetch, reduce, reduce, retain, reverse, sample, shuffle, skip, sort, sort, splitBy, stream, streamDoubles, streamInts, streamLongs, take, then, toArray, toMap, toMap, toMap, toMap, toMap, toMapSupplied, toMapSupplied, toMapSupplied, toMapSupplied
-
Field Details
-
pageSize
protected final int pageSize
-
-
Constructor Details
-
PagingScanner
protected PagingScanner(int pageSize)
-
-
Method Details
-
nextParam
Subclass should transform the last seen item into a key for the next request -
nextPage
-
advance
public boolean advance()Description copied from interface:ScannerTry to update current to the next item, if there is one.- Returns:
- True if it advanced
-