T
- target tuple typeR
- target tuple collection typepublic abstract class ProxyTarantoolClient<T extends Packable,R extends Collection<T>> extends Object implements TarantoolClient<T,R>
TarantoolClient
instance, proxying all CRUD operations through the
instance's call
method to the proxy functions defined on the Tarantool instance(s).
Proxy functions to be called can be specified by overriding the methods of the implemented
ProxyOperationsMappingConfig
interface. These functions must be public API functions available on the
Tarantool instance for the connected API user.
It is recommended to use this client with the CRUD module (
https://github.com/tarantool/crud) installed on the target Tarantool instance. Be sure that the server instances
you are connecting to with this client have the crud-router
role enabled.
The default implementation of metadata retrieving function is provided by the DDL module (https://github.com/tarantool/ddl). It is available by default on the Cartridge instances. In the other cases, you'll have to expose the DDL module as public API on the target Tarantool instance or use some other implementation of that function.
See https://github.com/tarantool/examples/blob/master/profile-storage/README.md
Constructor and Description |
---|
ProxyTarantoolClient(TarantoolClient<T,R> decoratedClient,
ProxyOperationsMappingConfig mappingConfig)
Basic constructor
|
Modifier and Type | Method and Description |
---|---|
CompletableFuture<List<?>> |
call(String functionName)
Execute a function defined on Tarantool instance.
|
CompletableFuture<List<?>> |
call(String functionName,
Collection<?> arguments)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
call(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
call(String functionName,
Collection<?> arguments,
Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
CompletableFuture<List<?>> |
call(String functionName,
Object... arguments)
Execute a function defined on Tarantool instance, The value mapper specified in the client configuration will be
used for converting the result values from MessagePack entities to objects.
|
<T> CompletableFuture<T> |
call(String functionName,
Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<T,R extends List<T>> |
callForMultiResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Supplier<CallResultMapper<R,MultiValueCallResult<T,R>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<T,R extends List<T>> |
callForMultiResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Supplier<R> resultContainerSupplier,
Class<T> resultClass)
Execute a function defined on Tarantool instance.
|
<T,R extends List<T>> |
callForMultiResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Supplier<R> resultContainerSupplier,
ValueConverter<org.msgpack.value.Value,T> valueConverter)
Execute a function defined on Tarantool instance.
|
<T,R extends List<T>> |
callForMultiResult(String functionName,
Collection<?> arguments,
Supplier<CallResultMapper<R,MultiValueCallResult<T,R>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<T,R extends List<T>> |
callForMultiResult(String functionName,
Collection<?> arguments,
Supplier<R> resultContainerSupplier,
Class<T> resultClass)
Execute a function defined on Tarantool instance.
|
<T,R extends List<T>> |
callForMultiResult(String functionName,
Collection<?> arguments,
Supplier<R> resultContainerSupplier,
ValueConverter<org.msgpack.value.Value,T> valueConverter)
Execute a function defined on Tarantool instance.
|
<T,R extends List<T>> |
callForMultiResult(String functionName,
Supplier<CallResultMapper<R,MultiValueCallResult<T,R>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<T,R extends List<T>> |
callForMultiResult(String functionName,
Supplier<R> resultContainerSupplier,
Class<T> resultClass)
Execute a function defined on Tarantool instance.
|
<T,R extends List<T>> |
callForMultiResult(String functionName,
Supplier<R> resultContainerSupplier,
ValueConverter<org.msgpack.value.Value,T> valueConverter)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
callForSingleResult(String functionName,
Class<T> resultClass)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
callForSingleResult(String functionName,
Collection<?> arguments,
Class<T> resultClass)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
callForSingleResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Class<T> resultClass)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
callForSingleResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
callForSingleResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
ValueConverter<org.msgpack.value.Value,T> valueConverter)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
callForSingleResult(String functionName,
Collection<?> arguments,
Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
callForSingleResult(String functionName,
Collection<?> arguments,
ValueConverter<org.msgpack.value.Value,T> valueConverter)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
callForSingleResult(String functionName,
Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<T> |
callForSingleResult(String functionName,
ValueConverter<org.msgpack.value.Value,T> valueConverter)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<TarantoolResult<T>> |
callForTupleResult(String functionName,
Class<T> entityClass)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<TarantoolResult<T>> |
callForTupleResult(String functionName,
Collection<?> arguments,
Class<T> entityClass)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<TarantoolResult<T>> |
callForTupleResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Class<T> entityClass)
Execute a function defined on Tarantool instance.
|
void |
close() |
CompletableFuture<List<?>> |
eval(String expression)
Execute a Lua expression in the Tarantool instance.
|
CompletableFuture<List<?>> |
eval(String expression,
Collection<?> arguments)
Execute a Lua expression in the Tarantool instance.
|
CompletableFuture<List<?>> |
eval(String expression,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Supplier<? extends MessagePackValueMapper> resultMapperSupplier)
Execute a Lua expression in the Tarantool instance.
|
CompletableFuture<List<?>> |
eval(String expression,
Collection<?> arguments,
Supplier<? extends MessagePackValueMapper> resultMapperSupplier)
Execute a Lua expression in the Tarantool instance.
|
CompletableFuture<List<?>> |
eval(String expression,
Supplier<? extends MessagePackValueMapper> resultMapperSupplier)
Execute a Lua expression in the Tarantool instance.
|
TarantoolClientConfig |
getConfig()
Get the Tarantool client config passed to this client
|
TarantoolConnectionListeners |
getConnectionListeners()
Get collection of connection listeners.
|
ResultMapperFactoryFactory |
getResultMapperFactoryFactory()
Get the default factory for result mapper factory instances
|
TarantoolVersion |
getVersion()
Get the Tarantool server version
|
TarantoolMetadataOperations |
metadata()
Provides operations for Tarantool spaces and indexes metadata
|
TarantoolMetadataProvider |
metadataProvider()
Provides implementation of retrieving the metadata for spaces and instances from Tarantool servers
|
boolean |
refresh()
Starts the process of establishing lacking connections to each host
|
TarantoolSpaceOperations<T,R> |
space(int spaceId)
Provides CRUD and other operations for a Tarantool space
|
TarantoolSpaceOperations<T,R> |
space(String spaceName)
Provides CRUD and other operations for a Tarantool space
|
protected abstract TarantoolSpaceOperations<T,R> |
spaceOperations(TarantoolClientConfig config,
TarantoolCallOperations client,
ProxyOperationsMappingConfig mappingConfig,
TarantoolMetadataOperations metadata,
TarantoolSpaceMetadata spaceMetadata)
Creates a space API implementation instance for the specified space
|
public ProxyTarantoolClient(TarantoolClient<T,R> decoratedClient, ProxyOperationsMappingConfig mappingConfig)
decoratedClient
- configured Tarantool clientmappingConfig
- config for proxy operations mappingpublic TarantoolSpaceOperations<T,R> space(int spaceId) throws TarantoolClientException
TarantoolClient
space
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
spaceId
- ID of the space, must be greater than 0TarantoolClientException
- if the client is not connectedpublic TarantoolSpaceOperations<T,R> space(String spaceName)
TarantoolClient
space
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
spaceName
- name of the space, must not be null or emptyprotected abstract TarantoolSpaceOperations<T,R> spaceOperations(TarantoolClientConfig config, TarantoolCallOperations client, ProxyOperationsMappingConfig mappingConfig, TarantoolMetadataOperations metadata, TarantoolSpaceMetadata spaceMetadata)
config
- Tarantool client configurationclient
- configured client instancemappingConfig
- proxy operations mapping configurationmetadata
- metadata operationsspaceMetadata
- current space metadatapublic TarantoolMetadataOperations metadata() throws TarantoolClientException
TarantoolClient
metadata
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
TarantoolClientException
- if the client is not connectedpublic TarantoolMetadataProvider metadataProvider()
TarantoolClient
metadataProvider
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
public TarantoolClientConfig getConfig()
TarantoolClient
getConfig
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
TarantoolClientConfig
instancepublic TarantoolVersion getVersion() throws TarantoolClientException
TarantoolClient
getVersion
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
TarantoolVersion
TarantoolClientException
- if the client is not connectedpublic TarantoolConnectionListeners getConnectionListeners()
TarantoolClient
getConnectionListeners
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
public ResultMapperFactoryFactory getResultMapperFactoryFactory()
TarantoolCallOperations
getResultMapperFactoryFactory
in interface TarantoolCallOperations
public CompletableFuture<List<?>> call(String functionName) throws TarantoolClientException
TarantoolCallOperations
call
in interface TarantoolCallOperations
functionName
- function name, must not be null or emptyTarantoolClientException
- if the client is not connected or some other error occurredpublic CompletableFuture<List<?>> call(String functionName, Object... arguments) throws TarantoolClientException
TarantoolCallOperations
call
in interface TarantoolCallOperations
functionName
- function name, must not be null or emptyarguments
- vararg array of function arguments. The object mapper specified in the client configuration
will be used for arguments conversion to MessagePack entitiesTarantoolClientException
- if the client is not connected or some other error occurredpublic CompletableFuture<List<?>> call(String functionName, Collection<?> arguments) throws TarantoolClientException
TarantoolCallOperations
call
in interface TarantoolCallOperations
functionName
- function name, must not be null or emptyarguments
- list of function arguments. The object mapper specified in the client configuration
will be used for arguments conversion to MessagePack entitiesTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<TarantoolResult<T>> callForTupleResult(String functionName, Class<T> entityClass) throws TarantoolClientException
TarantoolCallOperations
callForTupleResult
in interface TarantoolCallOperations
T
- desired function call result typefunctionName
- function name, must not be null or emptyentityClass
- target result entity classTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> call(String functionName, Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
call
in interface TarantoolCallOperations
T
- desired function call result typefunctionName
- function name, must not be null or emptyresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<TarantoolResult<T>> callForTupleResult(String functionName, Collection<?> arguments, Class<T> entityClass) throws TarantoolClientException
TarantoolCallOperations
callForTupleResult
in interface TarantoolCallOperations
T
- desired function call result typefunctionName
- function name, must not be null or emptyarguments
- list of function arguments. The object mapper specified in the client configuration
will be used for arguments conversion to MessagePack entitiesentityClass
- target result entity classTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> call(String functionName, Collection<?> arguments, Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
call
in interface TarantoolCallOperations
T
- desired function call result typefunctionName
- function name, must not be null or emptyarguments
- list of function arguments. The object mapper specified in the client configuration
will be used for arguments conversion to MessagePack entitiesresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<TarantoolResult<T>> callForTupleResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Class<T> entityClass) throws TarantoolClientException
TarantoolCallOperations
callForTupleResult
in interface TarantoolCallOperations
T
- desired function call result typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsargumentsMapperSupplier
- mapper supplier for arguments object-to-MessagePack entity conversionentityClass
- target result entity classTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> call(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
call
in interface TarantoolCallOperations
T
- desired function call result typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsargumentsMapperSupplier
- mapper supplier for arguments object-to-MessagePack entity conversionresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> callForSingleResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Class<T> resultClass) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
T
- target result content typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsargumentsMapperSupplier
- mapper supplier for arguments object-to-MessagePack entity conversionresultClass
- target result entity classTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> callForSingleResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, ValueConverter<org.msgpack.value.Value,T> valueConverter) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
T
- target result content typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsargumentsMapperSupplier
- mapper supplier for arguments object-to-MessagePack entity conversionvalueConverter
- MessagePack value to entity converter for each result itemTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> callForSingleResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
T
- target result content typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsargumentsMapperSupplier
- mapper supplier for arguments object-to-MessagePack entity conversionresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> callForSingleResult(String functionName, Collection<?> arguments, Class<T> resultClass) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
T
- target result content typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsresultClass
- target result entity classTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> callForSingleResult(String functionName, Collection<?> arguments, ValueConverter<org.msgpack.value.Value,T> valueConverter) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
T
- target result content typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsvalueConverter
- MessagePack value to entity converter for each result itemTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> callForSingleResult(String functionName, Collection<?> arguments, Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
T
- target result content typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> callForSingleResult(String functionName, Class<T> resultClass) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
T
- target result content typefunctionName
- function name, must not be null or emptyresultClass
- target result entity classTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> callForSingleResult(String functionName, ValueConverter<org.msgpack.value.Value,T> valueConverter) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
T
- target result content typefunctionName
- function name, must not be null or emptyvalueConverter
- MessagePack value to entity converter for each result itemTarantoolClientException
- if the client is not connected or some other error occurredpublic <T> CompletableFuture<T> callForSingleResult(String functionName, Supplier<CallResultMapper<T,SingleValueCallResult<T>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
T
- target result content typefunctionName
- function name, must not be null or emptyresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connected or some other error occurredpublic <T,R extends List<T>> CompletableFuture<R> callForMultiResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Supplier<R> resultContainerSupplier, Class<T> resultClass) throws TarantoolClientException
TarantoolCallOperations
callForMultiResult
in interface TarantoolCallOperations
T
- target result content typeR
- target result typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsargumentsMapperSupplier
- mapper supplier for arguments object-to-MessagePack entity conversionresultContainerSupplier
- supplier function for new empty result collectionresultClass
- target result entity classTarantoolClientException
- if the client is not connected or some other error occurredpublic <T,R extends List<T>> CompletableFuture<R> callForMultiResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Supplier<R> resultContainerSupplier, ValueConverter<org.msgpack.value.Value,T> valueConverter) throws TarantoolClientException
TarantoolCallOperations
callForMultiResult
in interface TarantoolCallOperations
T
- target result content typeR
- target result typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsargumentsMapperSupplier
- mapper supplier for arguments object-to-MessagePack entity conversionresultContainerSupplier
- supplier function for new empty result collectionvalueConverter
- MessagePack value to entity converter for each result itemTarantoolClientException
- if the client is not connected or some other error occurredpublic <T,R extends List<T>> CompletableFuture<R> callForMultiResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Supplier<CallResultMapper<R,MultiValueCallResult<T,R>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
callForMultiResult
in interface TarantoolCallOperations
T
- target result content typeR
- target result typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsargumentsMapperSupplier
- mapper supplier for arguments object-to-MessagePack entity conversionresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connected or some other error occurredpublic <T,R extends List<T>> CompletableFuture<R> callForMultiResult(String functionName, Collection<?> arguments, Supplier<R> resultContainerSupplier, Class<T> resultClass) throws TarantoolClientException
TarantoolCallOperations
callForMultiResult
in interface TarantoolCallOperations
T
- target result content typeR
- target result typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsresultContainerSupplier
- supplier function for new empty result collectionresultClass
- target result entity classTarantoolClientException
- if the client is not connected or some other error occurredpublic <T,R extends List<T>> CompletableFuture<R> callForMultiResult(String functionName, Collection<?> arguments, Supplier<R> resultContainerSupplier, ValueConverter<org.msgpack.value.Value,T> valueConverter) throws TarantoolClientException
TarantoolCallOperations
callForMultiResult
in interface TarantoolCallOperations
T
- target result content typeR
- target result typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsresultContainerSupplier
- supplier function for new empty result collectionvalueConverter
- MessagePack value to entity converter for each result itemTarantoolClientException
- if the client is not connected or some other error occurredpublic <T,R extends List<T>> CompletableFuture<R> callForMultiResult(String functionName, Collection<?> arguments, Supplier<CallResultMapper<R,MultiValueCallResult<T,R>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
callForMultiResult
in interface TarantoolCallOperations
T
- target result content typeR
- target result typefunctionName
- function name, must not be null or emptyarguments
- list of function argumentsresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connected or some other error occurredpublic <T,R extends List<T>> CompletableFuture<R> callForMultiResult(String functionName, Supplier<R> resultContainerSupplier, Class<T> resultClass) throws TarantoolClientException
TarantoolCallOperations
callForMultiResult
in interface TarantoolCallOperations
T
- target result content typeR
- target result typefunctionName
- function name, must not be null or emptyresultContainerSupplier
- supplier function for new empty result collectionresultClass
- target result entity classTarantoolClientException
- if the client is not connected or some other error occurredpublic <T,R extends List<T>> CompletableFuture<R> callForMultiResult(String functionName, Supplier<R> resultContainerSupplier, ValueConverter<org.msgpack.value.Value,T> valueConverter) throws TarantoolClientException
TarantoolCallOperations
callForMultiResult
in interface TarantoolCallOperations
T
- target result content typeR
- target result typefunctionName
- function name, must not be null or emptyresultContainerSupplier
- supplier function for new empty result collectionvalueConverter
- MessagePack value to entity converter for each result itemTarantoolClientException
- if the client is not connected or some other error occurredpublic <T,R extends List<T>> CompletableFuture<R> callForMultiResult(String functionName, Supplier<CallResultMapper<R,MultiValueCallResult<T,R>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
callForMultiResult
in interface TarantoolCallOperations
T
- target result content typeR
- target result typefunctionName
- function name, must not be null or emptyresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connected or some other error occurredpublic CompletableFuture<List<?>> eval(String expression) throws TarantoolClientException
TarantoolEvalOperations
return
. The value mapper specified in the client configuration will be used for converting
the result values from MessagePack entities to objects.eval
in interface TarantoolEvalOperations
expression
- lua expression, must not be null or emptyTarantoolClientException
- if the client is not connectedpublic CompletableFuture<List<?>> eval(String expression, Collection<?> arguments) throws TarantoolClientException
TarantoolEvalOperations
return
. The value mapper specified in the client configuration will be used for converting
the result values from MessagePack entities to objects.eval
in interface TarantoolEvalOperations
expression
- lua expression, must not be null or emptyarguments
- the list of function arguments. The object mapper specified in the client configuration
will be used for arguments conversion to MessagePack entitiesTarantoolClientException
- if the client is not connectedpublic CompletableFuture<List<?>> eval(String expression, Supplier<? extends MessagePackValueMapper> resultMapperSupplier) throws TarantoolClientException
TarantoolEvalOperations
return
.eval
in interface TarantoolEvalOperations
expression
- lua expression, must not be null or emptyresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connectedpublic CompletableFuture<List<?>> eval(String expression, Collection<?> arguments, Supplier<? extends MessagePackValueMapper> resultMapperSupplier) throws TarantoolClientException
TarantoolEvalOperations
return
.eval
in interface TarantoolEvalOperations
expression
- lua expression, must not be null or emptyarguments
- the list of function arguments. The object mapper specified in the client configuration
will be used for arguments conversion to MessagePack entitiesresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connectedpublic CompletableFuture<List<?>> eval(String expression, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Supplier<? extends MessagePackValueMapper> resultMapperSupplier) throws TarantoolClientException
TarantoolEvalOperations
return
.eval
in interface TarantoolEvalOperations
expression
- lua expression, must not be null or emptyarguments
- the list of function argumentsargumentsMapperSupplier
- mapper supplier for arguments object-to-MessagePack entity conversionresultMapperSupplier
- mapper supplier for result value MessagePack entity-to-object conversionTarantoolClientException
- if the client is not connectedpublic boolean refresh()
TarantoolClient
refresh
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2025 Picodata. All rights reserved.