@Requires(beans=DefaultRedisConfiguration.class) @Singleton @Factory public class DefaultRedisClientFactory extends AbstractRedisClientFactory
RedisClient
. Creates the injectable Primary
bean.Constructor and Description |
---|
DefaultRedisClientFactory() |
Modifier and Type | Method and Description |
---|---|
io.lettuce.core.RedisClient |
redisClient(AbstractRedisConfiguration config)
Creates the
RedisClient from the configuration. |
io.lettuce.core.api.StatefulRedisConnection<String,String> |
redisConnection(io.lettuce.core.RedisClient redisClient)
Creates the
StatefulRedisConnection from the RedisClient . |
io.lettuce.core.pubsub.StatefulRedisPubSubConnection<String,String> |
redisPubSubConnection(io.lettuce.core.RedisClient redisClient)
Creates the
StatefulRedisPubSubConnection from the RedisClient . |
@Bean(preDestroy="shutdown") @Singleton @Primary public io.lettuce.core.RedisClient redisClient(@Primary AbstractRedisConfiguration config)
AbstractRedisClientFactory
RedisClient
from the configuration.redisClient
in class AbstractRedisClientFactory
config
- The configurationRedisClient
@Bean(preDestroy="close") @Singleton @Primary public io.lettuce.core.api.StatefulRedisConnection<String,String> redisConnection(@Primary io.lettuce.core.RedisClient redisClient)
AbstractRedisClientFactory
StatefulRedisConnection
from the RedisClient
.redisConnection
in class AbstractRedisClientFactory
redisClient
- The RedisClient
StatefulRedisConnection
@Bean(preDestroy="close") @Singleton public io.lettuce.core.pubsub.StatefulRedisPubSubConnection<String,String> redisPubSubConnection(@Primary io.lettuce.core.RedisClient redisClient)
AbstractRedisClientFactory
StatefulRedisPubSubConnection
from the RedisClient
.redisPubSubConnection
in class AbstractRedisClientFactory
redisClient
- The RedisClient
StatefulRedisPubSubConnection