Interface RedisConfig
-
@ConfigMapping(prefix="quarkus.redis") @ConfigRoot(phase=RUN_TIME) public interface RedisConfig
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_CLIENT_NAME
static String
HOSTS_CONFIG_NAME
static String
REDIS_CONFIG_ROOT_NAME
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description RedisClientConfig
defaultRedisClient()
The default redis clientstatic boolean
isDefaultClient(String name)
Map<String,RedisClientConfig>
namedRedisClients()
Configures additional (named) Redis clients.static String
propertyKey(String name, String radical)
-
-
-
Field Detail
-
REDIS_CONFIG_ROOT_NAME
static final String REDIS_CONFIG_ROOT_NAME
- See Also:
- Constant Field Values
-
HOSTS_CONFIG_NAME
static final String HOSTS_CONFIG_NAME
- See Also:
- Constant Field Values
-
DEFAULT_CLIENT_NAME
static final String DEFAULT_CLIENT_NAME
- See Also:
- Constant Field Values
-
-
Method Detail
-
defaultRedisClient
@WithParentName RedisClientConfig defaultRedisClient()
The default redis client
-
namedRedisClients
@WithParentName @ConfigDocMapKey("redis-client-name") Map<String,RedisClientConfig> namedRedisClients()
Configures additional (named) Redis clients.Each client has a unique name which must be identified to select the right client. For example:
quarkus.redis.client1.hosts = redis://localhost:6379 quarkus.redis.client2.hosts = redis://localhost:6380
And then use the
RedisClientName
annotation to select theRedis
,Redis
,RedisAPI
andRedisAPI
beans.{ @code @RedisClientName("client1") @Inject RedisAPI redis; }
-
isDefaultClient
static boolean isDefaultClient(String name)
-
-