@Requires(property="redis.uris")
@Singleton
@Factory
public class DefaultRedisClusterClientFactory
extends java.lang.Object
"redis.uris"
setting.Constructor and Description |
---|
DefaultRedisClusterClientFactory() |
Modifier and Type | Method and Description |
---|---|
io.lettuce.core.cluster.RedisClusterClient |
redisClient(AbstractRedisConfiguration config,
io.lettuce.core.resource.ClientResources defaultClientResources)
Create the client based on config URIs.
|
io.lettuce.core.cluster.api.StatefulRedisClusterConnection<java.lang.String,java.lang.String> |
redisConnection(io.lettuce.core.cluster.RedisClusterClient redisClient)
Establish redis connection.
|
io.lettuce.core.pubsub.StatefulRedisPubSubConnection<java.lang.String,java.lang.String> |
redisPubSubConnection(io.lettuce.core.cluster.RedisClusterClient redisClient) |
@Bean(preDestroy="shutdown") @Singleton @Primary public io.lettuce.core.cluster.RedisClusterClient redisClient(@Primary AbstractRedisConfiguration config, @Primary @Nullable io.lettuce.core.resource.ClientResources defaultClientResources)
config
- configdefaultClientResources
- default ClientResources
@Bean(preDestroy="close") @Singleton @Primary public io.lettuce.core.cluster.api.StatefulRedisClusterConnection<java.lang.String,java.lang.String> redisConnection(@Primary io.lettuce.core.cluster.RedisClusterClient redisClient)
redisClient
- client.@Bean(preDestroy="close") @Singleton public io.lettuce.core.pubsub.StatefulRedisPubSubConnection<java.lang.String,java.lang.String> redisPubSubConnection(@Primary io.lettuce.core.cluster.RedisClusterClient redisClient)
redisClient
- redisClient