Class RedissonConnectionFactory

  • All Implemented Interfaces:
    org.springframework.beans.factory.DisposableBean, org.springframework.beans.factory.InitializingBean, org.springframework.dao.support.PersistenceExceptionTranslator, org.springframework.data.redis.connection.RedisConnectionFactory

    public class RedissonConnectionFactory
    extends Object
    implements org.springframework.data.redis.connection.RedisConnectionFactory, org.springframework.beans.factory.InitializingBean, org.springframework.beans.factory.DisposableBean
    Redisson based connection factory
    Author:
    Nikita Koksharov
    • Field Detail

      • EXCEPTION_TRANSLATION

        public static final org.springframework.data.redis.ExceptionTranslationStrategy EXCEPTION_TRANSLATION
    • Constructor Detail

      • RedissonConnectionFactory

        public RedissonConnectionFactory()
        Creates factory with default Redisson configuration
      • RedissonConnectionFactory

        public RedissonConnectionFactory​(org.redisson.api.RedissonClient redisson)
        Creates factory with defined Redisson instance
        Parameters:
        redisson - - Redisson instance
      • RedissonConnectionFactory

        public RedissonConnectionFactory​(org.redisson.config.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:
        translateExceptionIfPossible in interface org.springframework.dao.support.PersistenceExceptionTranslator
      • destroy

        public void destroy()
                     throws Exception
        Specified by:
        destroy in interface org.springframework.beans.factory.DisposableBean
        Throws:
        Exception
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception
      • getConnection

        public org.springframework.data.redis.connection.RedisConnection getConnection()
        Specified by:
        getConnection in interface org.springframework.data.redis.connection.RedisConnectionFactory
      • getClusterConnection

        public org.springframework.data.redis.connection.RedisClusterConnection getClusterConnection()
        Specified by:
        getClusterConnection in interface org.springframework.data.redis.connection.RedisConnectionFactory
      • getConvertPipelineAndTxResults

        public boolean getConvertPipelineAndTxResults()
        Specified by:
        getConvertPipelineAndTxResults in interface org.springframework.data.redis.connection.RedisConnectionFactory
      • getSentinelConnection

        public org.springframework.data.redis.connection.RedisSentinelConnection getSentinelConnection()
        Specified by:
        getSentinelConnection in interface org.springframework.data.redis.connection.RedisConnectionFactory