Package io.tarantool.driver.core.space
Class ProxyTarantoolTupleSpace
- java.lang.Object
-
- io.tarantool.driver.core.space.ProxyTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
-
- io.tarantool.driver.core.space.ProxyTarantoolTupleSpace
-
- All Implemented Interfaces:
TarantoolSpaceOperations<TarantoolTuple,TarantoolResult<TarantoolTuple>>
public class ProxyTarantoolTupleSpace extends ProxyTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
ProxyTarantoolSpace
implementation for working with default tuples
-
-
Constructor Summary
Constructors Constructor Description ProxyTarantoolTupleSpace(TarantoolClientConfig config, TarantoolCallOperations client, ProxyOperationsMappingConfig mappingConfig, TarantoolSpaceMetadata spaceMetadata, TarantoolMetadataOperations metadataOperations)
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 CallResultMapper<TarantoolResult<TarantoolTuple>,SingleValueCallResult<TarantoolResult<TarantoolTuple>>>
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.ProxyTarantoolSpace
delete, getMetadata, insert, replace, select, truncate, update, update, upsert
-
-
-
-
Constructor Detail
-
ProxyTarantoolTupleSpace
public ProxyTarantoolTupleSpace(TarantoolClientConfig config, TarantoolCallOperations client, ProxyOperationsMappingConfig mappingConfig, TarantoolSpaceMetadata spaceMetadata, TarantoolMetadataOperations metadataOperations)
Basic constructor- Parameters:
config
- Tarantool client configclient
- configured Tarantool clientmappingConfig
- proxy operation mapping configspaceMetadata
- current space metadatametadataOperations
- metadata operations
-
-
Method Detail
-
makeOperationsFromTuple
protected TupleOperations makeOperationsFromTuple(TarantoolTuple tuple)
Description copied from class:ProxyTarantoolSpace
Create aTupleOperations
instance from the given tuple of typeT
- Specified by:
makeOperationsFromTuple
in classProxyTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
- Parameters:
tuple
- tuple of the specified type- Returns:
- new
TupleOperations
instance
-
tupleResultMapper
protected CallResultMapper<TarantoolResult<TarantoolTuple>,SingleValueCallResult<TarantoolResult<TarantoolTuple>>> tupleResultMapper()
Description copied from class:ProxyTarantoolSpace
MessagePack value mapper configured with an ArrayValue to tuple converter corresponding to the selected tuple type- Specified by:
tupleResultMapper
in classProxyTarantoolSpace<TarantoolTuple,TarantoolResult<TarantoolTuple>>
- Returns:
- configured mapper with
ArrayValue
toT
converter
-
toString
public String toString()
- Overrides:
toString
in classProxyTarantoolSpace<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
-
-