Class RedissonConnectionFactory
- java.lang.Object
-
- org.redisson.spring.data.connection.RedissonConnectionFactory
-
- All Implemented Interfaces:
org.springframework.beans.factory.DisposableBean,org.springframework.beans.factory.InitializingBean,org.springframework.dao.support.PersistenceExceptionTranslator,org.springframework.data.redis.connection.ReactiveRedisConnectionFactory,org.springframework.data.redis.connection.RedisConnectionFactory
public class RedissonConnectionFactory extends Object implements org.springframework.data.redis.connection.RedisConnectionFactory, org.springframework.data.redis.connection.ReactiveRedisConnectionFactory, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
Redisson based connection factory- Author:
- Nikita Koksharov
-
-
Field Summary
Fields Modifier and Type Field Description static org.springframework.data.redis.ExceptionTranslationStrategyEXCEPTION_TRANSLATION
-
Constructor Summary
Constructors Constructor Description RedissonConnectionFactory()Creates factory with default Redisson configurationRedissonConnectionFactory(RedissonClient redisson)Creates factory with defined Redisson instanceRedissonConnectionFactory(Config config)Creates factory with defined Redisson config
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()voiddestroy()org.springframework.data.redis.connection.RedisClusterConnectiongetClusterConnection()org.springframework.data.redis.connection.RedisConnectiongetConnection()booleangetConvertPipelineAndTxResults()org.springframework.data.redis.connection.ReactiveRedisClusterConnectiongetReactiveClusterConnection()org.springframework.data.redis.connection.ReactiveRedisConnectiongetReactiveConnection()org.springframework.data.redis.connection.RedisSentinelConnectiongetSentinelConnection()org.springframework.dao.DataAccessExceptiontranslateExceptionIfPossible(RuntimeException ex)
-
-
-
Constructor Detail
-
RedissonConnectionFactory
public RedissonConnectionFactory()
Creates factory with default Redisson configuration
-
RedissonConnectionFactory
public RedissonConnectionFactory(RedissonClient redisson)
Creates factory with defined Redisson instance- Parameters:
redisson- - Redisson instance
-
RedissonConnectionFactory
public RedissonConnectionFactory(Config config)
Creates factory with defined Redisson config- Parameters:
config- - Redisson config
-
-
Method Detail
-
translateExceptionIfPossible
public org.springframework.dao.DataAccessException translateExceptionIfPossible(RuntimeException ex)
- Specified by:
translateExceptionIfPossiblein interfaceorg.springframework.dao.support.PersistenceExceptionTranslator
-
destroy
public void destroy() throws Exception- Specified by:
destroyin interfaceorg.springframework.beans.factory.DisposableBean- Throws:
Exception
-
afterPropertiesSet
public void afterPropertiesSet() throws Exception- Specified by:
afterPropertiesSetin interfaceorg.springframework.beans.factory.InitializingBean- Throws:
Exception
-
getConnection
public org.springframework.data.redis.connection.RedisConnection getConnection()
- Specified by:
getConnectionin interfaceorg.springframework.data.redis.connection.RedisConnectionFactory
-
getClusterConnection
public org.springframework.data.redis.connection.RedisClusterConnection getClusterConnection()
- Specified by:
getClusterConnectionin interfaceorg.springframework.data.redis.connection.RedisConnectionFactory
-
getConvertPipelineAndTxResults
public boolean getConvertPipelineAndTxResults()
- Specified by:
getConvertPipelineAndTxResultsin interfaceorg.springframework.data.redis.connection.RedisConnectionFactory
-
getSentinelConnection
public org.springframework.data.redis.connection.RedisSentinelConnection getSentinelConnection()
- Specified by:
getSentinelConnectionin interfaceorg.springframework.data.redis.connection.RedisConnectionFactory
-
getReactiveConnection
public org.springframework.data.redis.connection.ReactiveRedisConnection getReactiveConnection()
- Specified by:
getReactiveConnectionin interfaceorg.springframework.data.redis.connection.ReactiveRedisConnectionFactory
-
getReactiveClusterConnection
public org.springframework.data.redis.connection.ReactiveRedisClusterConnection getReactiveClusterConnection()
- Specified by:
getReactiveClusterConnectionin interfaceorg.springframework.data.redis.connection.ReactiveRedisConnectionFactory
-
-