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>>
TarantoolSpace
implementation 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 TupleOperations
makeOperationsFromTuple(TarantoolTuple tuple)
Create aTupleOperations
instance from the given tuple of typeT
String
toString()
protected MessagePackValueMapper
tupleResultMapper()
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:TarantoolSpace
Create aTupleOperations
instance from the given tuple of typeT
- Specified by:
makeOperationsFromTuple
in classTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
- Parameters:
tuple
- tuple of the specified type- Returns:
- new
TupleOperations
instance
-
tupleResultMapper
protected MessagePackValueMapper tupleResultMapper()
Description copied from class:TarantoolSpace
MessagePack value mapper configured with an ArrayValue to tuple converter corresponding to the selected tuple type- Specified by:
tupleResultMapper
in classTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
- Returns:
- configured mapper with
ArrayValue
toT
converter
-
toString
public String toString()
- Overrides:
toString
in classTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
-
cursor
public TarantoolCursor<TarantoolTuple> cursor(Conditions conditions, int batchSize)
Description copied from interface:TarantoolSpaceOperations
Cursor 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:TarantoolSpaceOperations
Same asTarantoolSpaceOperations.cursor(Conditions, int)
but uses the default batch size.- Parameters:
conditions
- query with options- Returns:
- cursor that can iterate through all corresponding tuples
-
-