@Experimental public interface BaseRedisMultiDbConnection
| Modifier and Type | Method and Description |
|---|---|
void |
addDatabase(DatabaseConfig databaseConfig)
Add a new database to the multi-database connection.
|
void |
addDatabase(RedisURI redisURI,
float weight)
Add a new database to the multi-database connection.
|
CircuitBreaker |
getCircuitBreaker(RedisURI endpoint)
Get the circuit breaker for a specific endpoint.
|
RedisURI |
getCurrentEndpoint()
Get the current database endpoint.
|
Iterable<RedisURI> |
getEndpoints()
Get all available database endpoints.
|
boolean |
isHealthy(RedisURI endpoint)
Check if an endpoint is healthy (health status is HEALTHY and circuit breaker is CLOSED).
|
void |
removeDatabase(RedisURI redisURI)
Remove a database from the multi-database connection.
|
void |
switchToDatabase(RedisURI redisURI)
Switch to a different database.
|
void switchToDatabase(RedisURI redisURI)
redisURI - the Redis URI of the database to switch to, must not be nullIllegalArgumentException - if the database does not existRedisURI getCurrentEndpoint()
Iterable<RedisURI> getEndpoints()
boolean isHealthy(RedisURI endpoint)
endpoint - the Redis endpoint URIIllegalArgumentException - if the endpoint is not knownCircuitBreaker getCircuitBreaker(RedisURI endpoint)
endpoint - the Redis endpoint URIIllegalArgumentException - if the endpoint is not knownvoid addDatabase(RedisURI redisURI, float weight)
redisURI - the Redis URI for the new database, must not be nullweight - the weight for load balancing, must be greater than 0IllegalArgumentException - if the database already exists or parameters are invalidvoid addDatabase(DatabaseConfig databaseConfig)
databaseConfig - the database configuration, must not be nullIllegalArgumentException - if the database already exists or configuration is invalidvoid removeDatabase(RedisURI redisURI)
redisURI - the Redis URI of the database to remove, must not be nullIllegalArgumentException - if the database does not existUnsupportedOperationException - if attempting to remove the currently active databaseCopyright © 2025 lettuce.io. All rights reserved.