Class RedisConfig
- java.lang.Object
-
- io.quarkus.redis.runtime.client.config.RedisConfig
-
@ConfigRoot(phase=RUN_TIME, name="redis") public class RedisConfig extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_CLIENT_NAME
RedisClientConfig
defaultRedisClient
The default redis clientstatic String
HOSTS_CONFIG_NAME
Map<String,RedisClientConfig>
namedRedisClients
Configures additional (named) Redis clients.static String
REDIS_CONFIG_ROOT_NAME
-
Constructor Summary
Constructors Constructor Description RedisConfig()
-
-
-
Field Detail
-
REDIS_CONFIG_ROOT_NAME
public static final String REDIS_CONFIG_ROOT_NAME
- See Also:
- Constant Field Values
-
HOSTS_CONFIG_NAME
public static final String HOSTS_CONFIG_NAME
- See Also:
- Constant Field Values
-
DEFAULT_CLIENT_NAME
public static final String DEFAULT_CLIENT_NAME
- See Also:
- Constant Field Values
-
defaultRedisClient
@ConfigItem(name="<<parent>>") public RedisClientConfig defaultRedisClient
The default redis client
-
namedRedisClients
@ConfigItem(name="<<parent>>") @ConfigDocMapKey("redis-client-name") public 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; }
-
-
Method Detail
-
isDefaultClient
public static boolean isDefaultClient(String name)
-
-