Skip to content

Commit

Permalink
Update docs with client factory methods #136
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Sep 20, 2015
1 parent 34ebbbb commit 2eefae6
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ Basic Usage
-----------

```java
RedisClient client = new RedisClient("localhost")
RedisClient client = RedisClient.create("redis://localhost")
RedisStringsConnection<String, String> connection = client.connect()
String value = connection.get("key")
```
Expand Down
23 changes: 23 additions & 0 deletions RELEASE-NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,28 @@ for the migration matrix.
* `RedisFuture`s are based on `CompleteableFuture` and throw now any occurred exception when accessing the value using `get()`.
Exceptions are passed down the `CompletionStage`s.

Client factory methods
----------------------
`RedisClient` and `RedisClusterClient` provide factory methods (`create`) to
create new instances. This is, to get flexibility by reducing the number of constructors
and in preparation for reusable `ClientResources` which will be added with lettuce 4.1.

The constructors of `RedisClient` and `RedisClusterClient` are deprecated and will
be removed in future versions.

```java
RedisClient client = RedisClient.create();

RedisClient client = RedisClient.create("redis://localhost/");

RedisClient client = RedisClient.create(RedisURI.Builder.redis("localhost", 6379).build());


RedisClusterClient client = RedisClusterClient.create("redis://localhost/");

RedisClusterClient client = RedisClusterClient.create(RedisURI.Builder.redis("localhost", 6379).build());
```


Cross-slot command execution
----------------------------
Expand Down Expand Up @@ -310,6 +332,7 @@ Enhancements
* Implement a CompressionCodec for GZIP and Deflate compression #127
* Implement synchronous multi-node execution API #129
* Use LinkedHashMap instead of HashMap for Map outputs #133 (thanks to @longkerdandy)
* Implement client factory methods (RedisClient.create, RedisClusterClient.create) #136

Fixes
-----
Expand Down

0 comments on commit 2eefae6

Please sign in to comment.