Package io.tarantool.driver.core.space
Class TarantoolTupleSpace
- java.lang.Object
-
- io.tarantool.driver.core.space.TarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
-
- io.tarantool.driver.core.space.TarantoolTupleSpace
-
- All Implemented Interfaces:
TarantoolSpaceOperations<TarantoolTuple,TarantoolResult<TarantoolTuple>>
public class TarantoolTupleSpace extends TarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
TarantoolSpaceimplementation for working with default tuples
-
-
Constructor Summary
Constructors Constructor Description TarantoolTupleSpace(TarantoolCallOperations client, TarantoolClientConfig config, TarantoolConnectionManager connectionManager, TarantoolMetadataOperations metadataOperations, TarantoolSpaceMetadata spaceMetadata)Basic constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TarantoolCursor<TarantoolTuple>cursor(Conditions conditions)Same asTarantoolSpaceOperations.cursor(Conditions, int)but uses the default batch size.TarantoolCursor<TarantoolTuple>cursor(Conditions conditions, int batchSize)Cursor is an iterator-like object that is able to scroll through results of a query.protected TupleOperationsmakeOperationsFromTuple(TarantoolTuple tuple)Create aTupleOperationsinstance from the given tuple of typeTStringtoString()protected MessagePackValueMappertupleResultMapper()MessagePack value mapper configured with an ArrayValue to tuple converter corresponding to the selected tuple type-
Methods inherited from class io.tarantool.driver.core.space.TarantoolSpace
delete, getMetadata, insert, replace, select, truncate, update, update, upsert
-
-
-
-
Constructor Detail
-
TarantoolTupleSpace
public TarantoolTupleSpace(TarantoolCallOperations client, TarantoolClientConfig config, TarantoolConnectionManager connectionManager, TarantoolMetadataOperations metadataOperations, TarantoolSpaceMetadata spaceMetadata)
Basic constructor- Parameters:
client- client that provides connection to tarantool serverconfig- client configconnectionManager- Tarantool server connection managerspaceMetadata- metadata for this spacemetadataOperations- metadata operations implementation
-
-
Method Detail
-
makeOperationsFromTuple
protected TupleOperations makeOperationsFromTuple(TarantoolTuple tuple)
Description copied from class:TarantoolSpaceCreate aTupleOperationsinstance from the given tuple of typeT- Specified by:
makeOperationsFromTuplein classTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>- Parameters:
tuple- tuple of the specified type- Returns:
- new
TupleOperationsinstance
-
tupleResultMapper
protected MessagePackValueMapper tupleResultMapper()
Description copied from class:TarantoolSpaceMessagePack value mapper configured with an ArrayValue to tuple converter corresponding to the selected tuple type- Specified by:
tupleResultMapperin classTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>- Returns:
- configured mapper with
ArrayValuetoTconverter
-
toString
public String toString()
- Overrides:
toStringin classTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
-
cursor
public TarantoolCursor<TarantoolTuple> cursor(Conditions conditions, int batchSize)
Description copied from interface:TarantoolSpaceOperationsCursor is an iterator-like object that is able to scroll through results of a query. Unlike a single cursor loads new tuples dynamically issuing requests to server. Select will fetch tuples matching the specified query. Each request to server will fetch no more than 'batch size' tuples.- Parameters:
conditions- query with optionsbatchSize- size of a batch of single client request- Returns:
- cursor that can iterate through all corresponding tuples
-
cursor
public TarantoolCursor<TarantoolTuple> cursor(Conditions conditions)
Description copied from interface:TarantoolSpaceOperationsSame asTarantoolSpaceOperations.cursor(Conditions, int)but uses the default batch size.- Parameters:
conditions- query with options- Returns:
- cursor that can iterate through all corresponding tuples
-
-