Class RedisConfiguration
- java.lang.Object
-
- org.hawaiiframework.cache.redis.config.RedisConfiguration
-
@Configuration @EnableConfigurationProperties(RedisConfigurationProperties.class) public class RedisConfiguration extends Object
Redis configuration.- Author:
- Richard Kohlen
-
-
Constructor Summary
Constructors Constructor Description RedisConfiguration(RedisConfigurationProperties properties, HawaiiTime hawaiiTime)
Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HawaiiRedisCacheBuilder
hawaiiRedisCacheBuilder(org.springframework.data.redis.connection.jedis.JedisConnectionFactory jedisConnectionFactory)
Provides aHawaiiRedisCacheBuilder
.org.springframework.data.redis.connection.jedis.JedisConnectionFactory
jedisConnectionFactory(org.springframework.data.redis.connection.RedisSentinelConfiguration sentinelConfiguration, redis.clients.jedis.JedisPoolConfig poolConfig)
Create a newJedisConnectionFactory
.redis.clients.jedis.JedisPoolConfig
jedisPoolConfig()
Creates a Jedis pool configuration.org.springframework.data.redis.connection.RedisSentinelConfiguration
redisSentinelConfiguration()
Creates a new redis sentinel configuration.
-
-
-
Constructor Detail
-
RedisConfiguration
@Autowired public RedisConfiguration(RedisConfigurationProperties properties, HawaiiTime hawaiiTime)
Constructor.- Parameters:
properties
- the properties to create the redis beans.hawaiiTime
- The hawaii time.
-
-
Method Detail
-
jedisConnectionFactory
@Bean public org.springframework.data.redis.connection.jedis.JedisConnectionFactory jedisConnectionFactory(org.springframework.data.redis.connection.RedisSentinelConfiguration sentinelConfiguration, redis.clients.jedis.JedisPoolConfig poolConfig)
Create a newJedisConnectionFactory
.- Returns:
- a new
JedisConnectionFactory
.
-
redisSentinelConfiguration
@Bean public org.springframework.data.redis.connection.RedisSentinelConfiguration redisSentinelConfiguration()
Creates a new redis sentinel configuration.- Returns:
- a redis sentinel config.
-
jedisPoolConfig
@Bean public redis.clients.jedis.JedisPoolConfig jedisPoolConfig() throws Exception
Creates a Jedis pool configuration.- Returns:
- a Jedis pool config.
- Throws:
Exception
-
hawaiiRedisCacheBuilder
@Bean public HawaiiRedisCacheBuilder hawaiiRedisCacheBuilder(org.springframework.data.redis.connection.jedis.JedisConnectionFactory jedisConnectionFactory)
Provides aHawaiiRedisCacheBuilder
.- Returns:
- an instance of
HawaiiRedisCacheBuilder
-
-