@Requires(beans=DefaultRedisConfiguration.class) @Requires(missingProperty="redis.uris") @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,
io.lettuce.core.resource.ClientResources defaultClientResources,
java.util.List<ClientResourcesMutator> mutators)
Creates the
RedisClient from the configuration. |
io.lettuce.core.api.StatefulRedisConnection<java.lang.String,java.lang.String> |
redisConnection(io.lettuce.core.RedisClient redisClient)
Creates the
StatefulRedisConnection from the RedisClient . |
io.lettuce.core.pubsub.StatefulRedisPubSubConnection<java.lang.String,java.lang.String> |
redisPubSubConnection(io.lettuce.core.RedisClient redisClient)
Creates the
StatefulRedisPubSubConnection from the RedisClient . |
redisClient, redisClient
@Bean(preDestroy="shutdown") @Singleton @Primary public io.lettuce.core.RedisClient redisClient(@Primary AbstractRedisConfiguration config, @Nullable @Primary io.lettuce.core.resource.ClientResources defaultClientResources, @Nullable java.util.List<ClientResourcesMutator> mutators)
AbstractRedisClientFactory
RedisClient
from the configuration.redisClient
in class AbstractRedisClientFactory
config
- The configurationdefaultClientResources
- The ClientResourcesmutators
- The list of mutatorsRedisClient
@Bean(preDestroy="close") @Singleton @Primary public io.lettuce.core.api.StatefulRedisConnection<java.lang.String,java.lang.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<java.lang.String,java.lang.String> redisPubSubConnection(@Primary io.lettuce.core.RedisClient redisClient)
AbstractRedisClientFactory
StatefulRedisPubSubConnection
from the RedisClient
.redisPubSubConnection
in class AbstractRedisClientFactory
redisClient
- The RedisClient
StatefulRedisPubSubConnection