private Object getConnection ( ) { Object connection ; if ( type == RedisToolsConstant . SINGLE ) { RedisConnection redisConnection = jedisConnectionFactory . getConnection ( ) ; connection = redisConnection . getNativeConnection ( ) ; } else { RedisClusterConnection clusterConnection = jedisConnectionFactory . getClusterConnection ( ) ; connection = clusterConnection . getNativeConnection ( ) ; } return connection ; }
get Redis connection