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
TarantoolCursor
for 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 boolean
advanceIterator()
protected void
fetchNextTuples()
Perform a call o server for fetching the next batch.protected T
getCurrentValue()
-
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 TarantoolClientException
Perform a call o server for fetching the next batch.- Specified by:
fetchNextTuples
in classTarantoolCursorBase<T extends Packable,R extends Collection<T>>
- Throws:
TarantoolClientException
- if select query was interrupted by client.
-
advanceIterator
protected boolean advanceIterator()
- Specified by:
advanceIterator
in classTarantoolCursorBase<T extends Packable,R extends Collection<T>>
-
getCurrentValue
protected T getCurrentValue()
- Specified by:
getCurrentValue
in classTarantoolCursorBase<T extends Packable,R extends Collection<T>>
-
-