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
Modifier and TypeFieldDescriptionstatic final org.springframework.data.redis.ExceptionTranslationStrategy
-
Constructor Summary
ConstructorDescriptionCreates factory with default Redisson configurationRedissonConnectionFactory
(RedissonClient redisson) Creates factory with defined Redisson instanceRedissonConnectionFactory
(Config config) Creates factory with defined Redisson config -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
destroy()
org.springframework.data.redis.connection.RedisClusterConnection
org.springframework.data.redis.connection.RedisConnection
boolean
org.springframework.data.redis.connection.ReactiveRedisClusterConnection
org.springframework.data.redis.connection.ReactiveRedisConnection
org.springframework.data.redis.connection.RedisSentinelConnection
org.springframework.dao.DataAccessException
-
Field Details
-
EXCEPTION_TRANSLATION
public static final org.springframework.data.redis.ExceptionTranslationStrategy EXCEPTION_TRANSLATION
-
-
Constructor Details
-
RedissonConnectionFactory
public RedissonConnectionFactory()Creates factory with default Redisson configuration -
RedissonConnectionFactory
Creates factory with defined Redisson instance- Parameters:
redisson
- - Redisson instance
-
RedissonConnectionFactory
Creates factory with defined Redisson config- Parameters:
config
- - Redisson config
-
-
Method Details
-
translateExceptionIfPossible
public org.springframework.dao.DataAccessException translateExceptionIfPossible(RuntimeException ex) - Specified by:
translateExceptionIfPossible
in interfaceorg.springframework.dao.support.PersistenceExceptionTranslator
-
destroy
- Specified by:
destroy
in interfaceorg.springframework.beans.factory.DisposableBean
- Throws:
Exception
-
afterPropertiesSet
- Specified by:
afterPropertiesSet
in interfaceorg.springframework.beans.factory.InitializingBean
- Throws:
Exception
-
getConnection
public org.springframework.data.redis.connection.RedisConnection getConnection()- Specified by:
getConnection
in interfaceorg.springframework.data.redis.connection.RedisConnectionFactory
-
getClusterConnection
public org.springframework.data.redis.connection.RedisClusterConnection getClusterConnection()- Specified by:
getClusterConnection
in interfaceorg.springframework.data.redis.connection.RedisConnectionFactory
-
getConvertPipelineAndTxResults
public boolean getConvertPipelineAndTxResults()- Specified by:
getConvertPipelineAndTxResults
in interfaceorg.springframework.data.redis.connection.RedisConnectionFactory
-
getSentinelConnection
public org.springframework.data.redis.connection.RedisSentinelConnection getSentinelConnection()- Specified by:
getSentinelConnection
in interfaceorg.springframework.data.redis.connection.RedisConnectionFactory
-
getReactiveConnection
public org.springframework.data.redis.connection.ReactiveRedisConnection getReactiveConnection()- Specified by:
getReactiveConnection
in interfaceorg.springframework.data.redis.connection.ReactiveRedisConnectionFactory
-
getReactiveClusterConnection
public org.springframework.data.redis.connection.ReactiveRedisClusterConnection getReactiveClusterConnection()- Specified by:
getReactiveClusterConnection
in interfaceorg.springframework.data.redis.connection.ReactiveRedisConnectionFactory
-