Interface RedisBuildTimeConfig
@ConfigMapping(prefix="quarkus.redis")
@ConfigRoot(phase=BUILD_TIME)
public interface RedisBuildTimeConfig
-
Method Summary
Modifier and TypeMethodDescription@WithUnnamedKey("<default>") Map<String, RedisClientBuildTimeConfig> clients()Configures the Redis clients.Returns aListof Redis Client names.booleanWhether a health check is published in case the smallrye-health extension is present.
-
Method Details
-
clients
@WithParentName @WithDefaults @WithUnnamedKey("<default>") @ConfigDocMapKey("redis-client-name") @WithUnnamedKey("<default>") Map<String,RedisClientBuildTimeConfig> clients()Configures the Redis clients.The default client does not have a name, and it is configured as:
quarkus.redis.hosts = redis://localhost:6379
And then useInjectto inject the client:@Inject RedisAPI redis;
Named clients must be identified to select the right client:
quarkus.redis.client1.hosts = redis://localhost:6379 quarkus.redis.client2.hosts = redis://localhost:6380
And then use theRedisClientNameannotation to select any of the beans:RedisRedisRedisAPIRedisAPIRedisDataSourceReactiveRedisDataSource
@RedisClientName("client1") @Inject RedisAPI redis; -
clientsNames
Returns aListof Redis Client names. The first element of the list is the default Redis Client if available. The remaining order is unspecified.- Returns:
- a
Listof Redis Client names
-
healthEnabled
@WithName("health.enabled") @WithDefault("true") boolean healthEnabled()Whether a health check is published in case the smallrye-health extension is present.
-