Package io.tarantool.driver.api
Interface TarantoolClient<T extends Packable,R extends Collection<T>>
-
- All Superinterfaces:
AutoCloseable
,TarantoolCallOperations
,TarantoolEvalOperations
- All Known Implementing Classes:
AbstractTarantoolClient
,ClusterTarantoolClient
,ClusterTarantoolTupleClient
,ProxyTarantoolClient
,ProxyTarantoolTupleClient
,RetryingTarantoolClient
,RetryingTarantoolTupleClient
public interface TarantoolClient<T extends Packable,R extends Collection<T>> extends AutoCloseable, TarantoolCallOperations, TarantoolEvalOperations
Basic Tarantool client interface
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TarantoolClientConfig
getConfig()
Get the Tarantool client config passed to this clientTarantoolConnectionListeners
getConnectionListeners()
Get collection of connection listeners.TarantoolVersion
getVersion()
Get the Tarantool server versionTarantoolMetadataOperations
metadata()
Provides operations for Tarantool spaces and indexes metadataTarantoolMetadataProvider
metadataProvider()
Provides implementation of retrieving the metadata for spaces and instances from Tarantool serversboolean
refresh()
Starts the process of establishing lacking connections to each hostTarantoolSpaceOperations<T,R>
space(int spaceId)
Provides CRUD and other operations for a Tarantool spaceTarantoolSpaceOperations<T,R>
space(String spaceName)
Provides CRUD and other operations for a Tarantool space-
Methods inherited from interface java.lang.AutoCloseable
close
-
Methods inherited from interface io.tarantool.driver.api.TarantoolCallOperations
call, call, call, call, call, call, call, call, call, call, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForMultiResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, callForSingleResult, getResultMapperFactoryFactory
-
-
-
-
Method Detail
-
metadataProvider
TarantoolMetadataProvider metadataProvider()
Provides implementation of retrieving the metadata for spaces and instances from Tarantool servers- Returns:
- metadata provider instance
-
getConfig
TarantoolClientConfig getConfig()
Get the Tarantool client config passed to this client- Returns:
TarantoolClientConfig
instance
-
getVersion
TarantoolVersion getVersion() throws TarantoolClientException
Get the Tarantool server version- Returns:
TarantoolVersion
- Throws:
TarantoolClientException
- if the client is not connected
-
space
TarantoolSpaceOperations<T,R> space(String spaceName) throws TarantoolClientException
Provides CRUD and other operations for a Tarantool space- Parameters:
spaceName
- name of the space, must not be null or empty- Returns:
- Tarantool space operations interface
- Throws:
TarantoolClientException
- if the client is not connected
-
space
TarantoolSpaceOperations<T,R> space(int spaceId) throws TarantoolClientException
Provides CRUD and other operations for a Tarantool space- Parameters:
spaceId
- ID of the space, must be greater than 0- Returns:
- Tarantool space operations implementation
- Throws:
TarantoolClientException
- if the client is not connected
-
metadata
TarantoolMetadataOperations metadata() throws TarantoolClientException
Provides operations for Tarantool spaces and indexes metadata- Returns:
- Tarantool metadata operations implementation
- Throws:
TarantoolClientException
- if the client is not connected
-
getConnectionListeners
TarantoolConnectionListeners getConnectionListeners()
Get collection of connection listeners. Used for adding new listeners, removing listeners or examining the collection- Returns:
- connection listeners
-
refresh
boolean refresh()
Starts the process of establishing lacking connections to each host- Returns:
- returns true if the establishing process has been started, else false
-
-