T
- target tuple typeR
- target tuple collection typepublic abstract class AbstractTarantoolClient<T extends Packable,R extends Collection<T>> extends Object implements TarantoolClient<T,R>
Modifier | Constructor and Description |
---|---|
|
AbstractTarantoolClient(TarantoolClientConfig config)
Create a client.
|
protected |
AbstractTarantoolClient(TarantoolClientConfig config,
ConnectionSelectionStrategyFactory selectionStrategyFactory,
TarantoolConnectionListeners listeners)
Deprecated.
|
|
AbstractTarantoolClient(TarantoolClientConfig config,
TarantoolConnectionListeners listeners)
Create a client, specifying the connection established event listeners.
|
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.
|
<S> CompletableFuture<S> |
callForSingleResult(String functionName,
Class<S> resultClass)
Execute a function defined on Tarantool instance.
|
<S> CompletableFuture<S> |
callForSingleResult(String functionName,
Collection<?> arguments,
Class<S> resultClass)
Execute a function defined on Tarantool instance.
|
<S> CompletableFuture<S> |
callForSingleResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Class<S> resultClass)
Execute a function defined on Tarantool instance.
|
<S> CompletableFuture<S> |
callForSingleResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Supplier<CallResultMapper<S,SingleValueCallResult<S>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<S> CompletableFuture<S> |
callForSingleResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
ValueConverter<org.msgpack.value.Value,S> valueConverter)
Execute a function defined on Tarantool instance.
|
<S> CompletableFuture<S> |
callForSingleResult(String functionName,
Collection<?> arguments,
Supplier<CallResultMapper<S,SingleValueCallResult<S>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<S> CompletableFuture<S> |
callForSingleResult(String functionName,
Collection<?> arguments,
ValueConverter<org.msgpack.value.Value,S> valueConverter)
Execute a function defined on Tarantool instance.
|
<S> CompletableFuture<S> |
callForSingleResult(String functionName,
Supplier<CallResultMapper<S,SingleValueCallResult<S>>> resultMapperSupplier)
Execute a function defined on Tarantool instance.
|
<S> CompletableFuture<S> |
callForSingleResult(String functionName,
ValueConverter<org.msgpack.value.Value,S> valueConverter)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<TarantoolResult<T>> |
callForTupleResult(String functionName,
Class<T> tupleClass)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<TarantoolResult<T>> |
callForTupleResult(String functionName,
Collection<?> arguments,
Class<T> tupleClass)
Execute a function defined on Tarantool instance.
|
<T> CompletableFuture<TarantoolResult<T>> |
callForTupleResult(String functionName,
Collection<?> arguments,
Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier,
Class<T> tupleClass)
Execute a function defined on Tarantool instance.
|
void |
close() |
protected abstract TarantoolConnectionManager |
connectionManager(TarantoolClientConfig config,
TarantoolConnectionFactory connectionFactory,
TarantoolConnectionListeners listeners)
Provides a connection manager for Tarantool server connections
|
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.
|
protected io.netty.bootstrap.Bootstrap |
getBootstrap() |
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,
TarantoolConnectionManager connectionManager,
TarantoolMetadataOperations metadata,
TarantoolSpaceMetadata spaceMetadata)
Creates a space API implementation instance for the specified space
|
public AbstractTarantoolClient(TarantoolClientConfig config)
config
- the client configurationTarantoolClientConfig
protected AbstractTarantoolClient(TarantoolClientConfig config, ConnectionSelectionStrategyFactory selectionStrategyFactory, TarantoolConnectionListeners listeners)
config
- the client configurationselectionStrategyFactory
- instantiates strategies which provide the algorithm of selecting connections
from the connection pool for performing the next requestlisteners
- connection established event listenersTarantoolClientConfig
public AbstractTarantoolClient(TarantoolClientConfig config, TarantoolConnectionListeners listeners)
config
- the client configurationlisteners
- connection established event listenersTarantoolClientConfig
protected abstract TarantoolConnectionManager connectionManager(TarantoolClientConfig config, TarantoolConnectionFactory connectionFactory, TarantoolConnectionListeners listeners)
config
- contains Tarantool client configuration optionsconnectionFactory
- provides helper methods for connection instantiationlisteners
- listeners which will be invoked once all connections are establishedpublic boolean refresh()
TarantoolClient
refresh
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
public TarantoolVersion getVersion() throws TarantoolClientException
TarantoolClient
getVersion
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
TarantoolVersion
TarantoolClientException
- if the client is not connectedpublic TarantoolSpaceOperations<T,R> space(String spaceName) throws TarantoolClientException
TarantoolClient
space
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
spaceName
- name of the space, must not be null or emptyTarantoolClientException
- if the client is not connectedpublic 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 connectedprotected abstract TarantoolSpaceOperations<T,R> spaceOperations(TarantoolClientConfig config, TarantoolConnectionManager connectionManager, TarantoolMetadataOperations metadata, TarantoolSpaceMetadata spaceMetadata)
config
- Tarantool client configurationconnectionManager
- configured internal connection managermetadata
- 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 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> tupleClass) throws TarantoolClientException
TarantoolCallOperations
callForTupleResult
in interface TarantoolCallOperations
T
- desired function call result typefunctionName
- function name, must not be null or emptytupleClass
- 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> tupleClass) 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 entitiestupleClass
- 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> tupleClass) 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 conversiontupleClass
- 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 <S> CompletableFuture<S> callForSingleResult(String functionName, Collection<?> arguments, Class<S> resultClass) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
S
- 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 <S> CompletableFuture<S> callForSingleResult(String functionName, Collection<?> arguments, ValueConverter<org.msgpack.value.Value,S> valueConverter) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
S
- 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 <S> CompletableFuture<S> callForSingleResult(String functionName, Collection<?> arguments, Supplier<CallResultMapper<S,SingleValueCallResult<S>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
S
- 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 <S> CompletableFuture<S> callForSingleResult(String functionName, Class<S> resultClass) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
S
- 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 <S> CompletableFuture<S> callForSingleResult(String functionName, ValueConverter<org.msgpack.value.Value,S> valueConverter) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
S
- 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 <S> CompletableFuture<S> callForSingleResult(String functionName, Supplier<CallResultMapper<S,SingleValueCallResult<S>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
S
- 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 <S> CompletableFuture<S> callForSingleResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Class<S> resultClass) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
S
- 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 <S> CompletableFuture<S> callForSingleResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, ValueConverter<org.msgpack.value.Value,S> valueConverter) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
S
- 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 <S> CompletableFuture<S> callForSingleResult(String functionName, Collection<?> arguments, Supplier<? extends MessagePackObjectMapper> argumentsMapperSupplier, Supplier<CallResultMapper<S,SingleValueCallResult<S>>> resultMapperSupplier) throws TarantoolClientException
TarantoolCallOperations
callForSingleResult
in interface TarantoolCallOperations
S
- 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,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 <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 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 TarantoolClientConfig getConfig()
TarantoolClient
getConfig
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
TarantoolClientConfig
instanceprotected io.netty.bootstrap.Bootstrap getBootstrap()
public void close() throws Exception
close
in interface AutoCloseable
Exception
public TarantoolConnectionListeners getConnectionListeners()
TarantoolClient
getConnectionListeners
in interface TarantoolClient<T extends Packable,R extends Collection<T>>
public ResultMapperFactoryFactory getResultMapperFactoryFactory()
TarantoolCallOperations
getResultMapperFactoryFactory
in interface TarantoolCallOperations
Copyright © 2025 Picodata. All rights reserved.