io.tarantool.driver.api.cursor.TarantoolCursor Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of cartridge-driver Show documentation
Show all versions of cartridge-driver Show documentation
Tarantool Cartridge driver for Tarantool versions 1.10+ based on Netty framework
package io.tarantool.driver.api.cursor;
import io.tarantool.driver.exceptions.TarantoolClientException;
import io.tarantool.driver.exceptions.TarantoolSpaceOperationException;
import io.tarantool.driver.protocol.Packable;
/**
* Basic cursor interface which allows forward-only iteration
* through query results.
*
* Warning: 'TarantoolCursor' cursors are not thread-safe.
*
* @author Vladimir Rogach
*/
public interface TarantoolCursor {
/**
* Fetch next element.
*
* @return true if element was fetched, false if no elements left.
* @throws TarantoolClientException if the request to server failed.
*/
boolean next() throws TarantoolClientException;
/**
* @return current element or null if cursor is not initialized
* @throws TarantoolSpaceOperationException when no data is available
*/
T get() throws TarantoolSpaceOperationException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy