Skip to content

Commit 65f628a

Browse files
committed
Polishing.
Reorder factory fields according to immutable configuration, mutable configuration and connection factory state. Reorder methods and switch Jedis references to its current GitHub repository. Refine assertions. Update documentation. See: #2503 Original pull request: #2627
1 parent 908a4d0 commit 65f628a

13 files changed

+270
-258
lines changed

README.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ This modules provides integration with the https://redis.io/[Redis] store.
99

1010
== Features
1111

12-
* Connection package as low-level abstraction across multiple Redis drivers (https://github.com/lettuce-io/lettuce-core[Lettuce] and https://github.com/xetorthio/jedis[Jedis]).
12+
* Connection package as low-level abstraction across multiple Redis drivers (https://github.com/lettuce-io/lettuce-core[Lettuce] and https://github.com/redis/jedis[Jedis]).
1313
* Exception translation to Spring’s portable Data Access exception hierarchy for Redis driver exceptions
1414
* https://docs.spring.io/spring-data/data-redis/docs/current/reference/html/#redis:template[`RedisTemplate`] that provides a high level abstraction for performing various Redis operations, exception translation and serialization support.
1515
* Pubsub support (such as a MessageListenerContainer for message-driven POJOs).

src/main/asciidoc/reference/redis-repositories.adoc

+1
Original file line numberDiff line numberDiff line change
@@ -845,6 +845,7 @@ class RedisOperationsProducer {
845845
846846
LettuceConnectionFactory connectionFactory = new LettuceConnectionFactory(new RedisStandaloneConfiguration());
847847
connectionFactory.afterPropertiesSet();
848+
connectionFactory.start();
848849
849850
return connectionFactory;
850851
}

src/main/java/org/springframework/data/redis/connection/RedisConnectionFactory.java

+11-11
Original file line numberDiff line numberDiff line change
@@ -30,39 +30,39 @@ public interface RedisConnectionFactory extends PersistenceExceptionTranslator {
3030
* Returns a suitable {@link RedisConnection connection} for interacting with Redis.
3131
*
3232
* @return {@link RedisConnection connection} for interacting with Redis.
33-
* @throws IllegalStateException if the connection factory requires initialization and the factory has not yet
34-
* been initialized.
33+
* @throws IllegalStateException if the connection factory requires initialization and the factory has not yet been
34+
* initialized.
3535
*/
3636
RedisConnection getConnection();
3737

3838
/**
3939
* Returns a suitable {@link RedisClusterConnection connection} for interacting with Redis Cluster.
4040
*
4141
* @return a {@link RedisClusterConnection connection} for interacting with Redis Cluster.
42-
* @throws IllegalStateException if the connection factory requires initialization and the factory has not yet
43-
* been initialized.
42+
* @throws IllegalStateException if the connection factory requires initialization and the factory has not yet been
43+
* initialized.
4444
* @since 1.7
4545
*/
4646
RedisClusterConnection getClusterConnection();
4747

4848
/**
4949
* Specifies if pipelined results should be converted to the expected data type.
5050
* <p>
51-
* If {@literal false}, results of {@link RedisConnection#closePipeline()} and {@link RedisConnection#exec()}
52-
* will be of the type returned by the underlying driver. This method is mostly for backwards compatibility
53-
* with {@literal 1.0}. It is generally always a good idea to allow results to be converted and deserialized.
54-
* In fact, this is now the default behavior.
51+
* If {@literal false}, results of {@link RedisConnection#closePipeline()} and {@link RedisConnection#exec()} will be
52+
* of the type returned by the underlying driver. This method is mostly for backwards compatibility with
53+
* {@literal 1.0}. It is generally always a good idea to allow results to be converted and deserialized. In fact, this
54+
* is now the default behavior.
5555
*
56-
* @return a boolen indicating whether to convert pipeline and transaction results.
56+
* @return {@code true} to convert pipeline and transaction results; {@code false} otherwise.
5757
*/
5858
boolean getConvertPipelineAndTxResults();
5959

6060
/**
6161
* Returns a suitable {@link RedisSentinelConnection connection} for interacting with Redis Sentinel.
6262
*
6363
* @return a {@link RedisSentinelConnection connection} for interacting with Redis Sentinel.
64-
* @throws IllegalStateException if the connection factory requires initialization and the factory has not yet
65-
* been initialized.
64+
* @throws IllegalStateException if the connection factory requires initialization and the factory has not yet been
65+
* initialized.
6666
* @since 1.4
6767
*/
6868
RedisSentinelConnection getSentinelConnection();

0 commit comments

Comments
 (0)