@Experimental public interface MultiDbClient extends BaseRedisClient
| Modifier and Type | Method and Description |
|---|---|
StatefulRedisMultiDbConnection<String,String> |
connect()
Open a new multi database connection to a Redis server that treats keys and values as UTF-8 strings.
|
<K,V> StatefulRedisMultiDbConnection<K,V> |
connect(RedisCodec<K,V> codec)
Open a new multi database connection to a Redis server.
|
MultiDbConnectionFuture<StatefulRedisMultiDbConnection<String,String>> |
connectAsync()
Open asynchronously a new multi database connection to a Redis server that treats keys and values as UTF-8 strings.
|
<K,V> MultiDbConnectionFuture<StatefulRedisMultiDbConnection<K,V>> |
connectAsync(RedisCodec<K,V> codec)
Open asynchronously a new multi database connection to a Redis server.
|
StatefulRedisMultiDbPubSubConnection<String,String> |
connectPubSub()
Open a new multi database pub/sub connection to a Redis server that treats keys and values as UTF-8 strings.
|
<K,V> StatefulRedisMultiDbPubSubConnection<K,V> |
connectPubSub(RedisCodec<K,V> codec)
Open a new multi database pub/sub connection to a Redis server.
|
MultiDbConnectionFuture<StatefulRedisMultiDbPubSubConnection<String,String>> |
connectPubSubAsync()
Open asynchronously a new multi database pub/sub connection to a Redis server that treats keys and values as UTF-8
strings.
|
<K,V> MultiDbConnectionFuture<StatefulRedisMultiDbPubSubConnection<K,V>> |
connectPubSubAsync(RedisCodec<K,V> codec)
Open asynchronously a new multi database pub/sub connection to a Redis server.
|
static MultiDbClient |
create(ClientResources resources,
Collection<DatabaseConfig> databaseConfigs)
Create a new MultiDbClient with the given client resources and database configurations.
|
static MultiDbClient |
create(ClientResources resources,
Collection<DatabaseConfig> databaseConfigs,
MultiDbOptions multiDbOptions)
Create a new MultiDbClient with the given client resources, database configurations, and multi-database options.
|
static MultiDbClient |
create(Collection<DatabaseConfig> databaseConfigs)
Create a new MultiDbClient with the given database configurations.
|
static MultiDbClient |
create(Collection<DatabaseConfig> databaseConfigs,
MultiDbOptions multiDbOptions)
Create a new MultiDbClient with the given database configurations and multi-database options.
|
MultiDbOptions |
getMultiDbOptions()
Gets the multi-database options.
|
Collection<RedisURI> |
getRedisURIs()
Get the configured Redis URIs.
|
addListener, addListener, getResources, removeListener, removeListener, shutdown, shutdown, shutdown, shutdownAsync, shutdownAsyncclosestatic MultiDbClient create(Collection<DatabaseConfig> databaseConfigs)
databaseConfigs - the database configurationsstatic MultiDbClient create(ClientResources resources, Collection<DatabaseConfig> databaseConfigs)
resources - the client resourcesdatabaseConfigs - the database configurationsstatic MultiDbClient create(Collection<DatabaseConfig> databaseConfigs, MultiDbOptions multiDbOptions)
databaseConfigs - the database configurationsmultiDbOptions - the multi-database optionsstatic MultiDbClient create(ClientResources resources, Collection<DatabaseConfig> databaseConfigs, MultiDbOptions multiDbOptions)
resources - the client resourcesdatabaseConfigs - the database configurationsmultiDbOptions - the multi-database optionsCollection<RedisURI> getRedisURIs()
<K,V> StatefulRedisMultiDbConnection<K,V> connect(RedisCodec<K,V> codec)
codec to encode/decode keys
and values.K - Key typeV - Value typecodec - Use this codec to encode/decode keys and values, must not be nullStatefulRedisMultiDbConnection<String,String> connect()
<K,V> StatefulRedisMultiDbPubSubConnection<K,V> connectPubSub(RedisCodec<K,V> codec)
codec to
encode/decode keys and values.K - Key typeV - Value typecodec - Use this codec to encode/decode keys and values, must not be nullStatefulRedisMultiDbPubSubConnection<String,String> connectPubSub()
<K,V> MultiDbConnectionFuture<StatefulRedisMultiDbConnection<K,V>> connectAsync(RedisCodec<K,V> codec)
codec to
encode/decode keys and values.
The returned MultiDbConnectionFuture ensures that all callbacks (thenApply, thenAccept, etc.) execute on a
separate thread pool rather than on Netty event loop threads, preventing deadlocks when calling blocking sync operations
inside callbacks.
K - Key typeV - Value typecodec - Use this codec to encode/decode keys and values, must not be nullMultiDbConnectionFuture that is notified with the connection progress.MultiDbConnectionFuture<StatefulRedisMultiDbConnection<String,String>> connectAsync()
The returned MultiDbConnectionFuture ensures that all callbacks (thenApply, thenAccept, etc.) execute on a
separate thread pool rather than on Netty event loop threads, preventing deadlocks when calling blocking sync operations
inside callbacks.
MultiDbConnectionFuture that is notified with the connection progress.<K,V> MultiDbConnectionFuture<StatefulRedisMultiDbPubSubConnection<K,V>> connectPubSubAsync(RedisCodec<K,V> codec)
codec
to encode/decode keys and values.
The returned MultiDbConnectionFuture ensures that all callbacks (thenApply, thenAccept, etc.) execute on a
separate thread pool rather than on Netty event loop threads, preventing deadlocks when calling blocking sync operations
inside callbacks.
K - Key typeV - Value typecodec - Use this codec to encode/decode keys and values, must not be nullMultiDbConnectionFuture that is notified with the pub/sub connection progress.MultiDbConnectionFuture<StatefulRedisMultiDbPubSubConnection<String,String>> connectPubSubAsync()
The returned MultiDbConnectionFuture ensures that all callbacks (thenApply, thenAccept, etc.) execute on a
separate thread pool rather than on Netty event loop threads, preventing deadlocks when calling blocking sync operations
inside callbacks.
MultiDbConnectionFuture that is notified with the pub/sub connection progress.MultiDbOptions getMultiDbOptions()
Copyright © 2026 lettuce.io. All rights reserved.