Package io.tarantool.driver.api.cursor
Class OffsetCursor<T extends Packable,R extends Collection<T>>
- java.lang.Object
-
- io.tarantool.driver.api.cursor.TarantoolCursorBase<T,R>
-
- io.tarantool.driver.api.cursor.OffsetCursor<T,R>
-
- All Implemented Interfaces:
TarantoolCursor<T>
public class OffsetCursor<T extends Packable,R extends Collection<T>> extends TarantoolCursorBase<T,R>
Cursor implementation that uses server 'limit' and 'offset' methods under the hood.Note: it is possible to use this class with standalone server only.
See
TarantoolCursorfor more details on cursors.
-
-
Constructor Summary
Constructors Constructor Description OffsetCursor(TarantoolSpaceOperations<T,R> space, Conditions conditions, int batchSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected booleanadvanceIterator()protected voidfetchNextTuples()Perform a call o server for fetching the next batch.protected TgetCurrentValue()-
Methods inherited from class io.tarantool.driver.api.cursor.TarantoolCursorBase
calcLimit, get, next
-
-
-
-
Constructor Detail
-
OffsetCursor
public OffsetCursor(TarantoolSpaceOperations<T,R> space, Conditions conditions, int batchSize)
-
-
Method Detail
-
fetchNextTuples
protected void fetchNextTuples() throws TarantoolClientExceptionPerform a call o server for fetching the next batch.- Specified by:
fetchNextTuplesin classTarantoolCursorBase<T extends Packable,R extends Collection<T>>- Throws:
TarantoolClientException- if select query was interrupted by client.
-
advanceIterator
protected boolean advanceIterator()
- Specified by:
advanceIteratorin classTarantoolCursorBase<T extends Packable,R extends Collection<T>>
-
getCurrentValue
protected T getCurrentValue()
- Specified by:
getCurrentValuein classTarantoolCursorBase<T extends Packable,R extends Collection<T>>
-
-