Commit Graph

1541 Commits

Author SHA1 Message Date
Mark Paluch
ca5f9ee2d6 DATAREDIS-720 - Reuse shared connection across reactive connection wrappers.
We now reuse a shared Lettuce connection across our reactive connection wrappers if LettuceConnectionFactory is configured to provide a shared connection instance. Reactive connections can either operate with a shared connection or with a connection provider only.

We also now execute blocking Redis commands (BLPOP, BRPOP, BRPOPLPUSH) on dedicated connection.

Original Pull Request: #290
2017-10-24 15:10:48 +02:00
Mark Paluch
cb61a50247 DATAREDIS-719 - Use asynchronous Lettuce API for transactions.
We now use the asynchronous API to dispatch commands within a transaction using the Lettuce driver. This allows us dropping our additional result wrappers and use a single, uniform api for deferred results.

Original pull request: #289.
2017-10-23 13:38:42 +02:00
Mark Paluch
39541122d1 DATAREDIS-719 - Polishing.
Fix generics for accepted Future, Supplier and Converter. Introduce generics for status responses. Add Javadoc, use synchronous API for exists call.

Original pull request: #289.
2017-10-23 13:38:38 +02:00
Christoph Strobl
435ace8f55 DATAREDIS-719 - Rework FutureResult and implementations for Jedis/Lettuce.
We now encapsulate deferred results for pipelining and transactions entirely within FutureResult and its subtypes. FutureResult accepts a Supplier<T> for default values, if operations return null and reports whether its result requires conversion. JedisResult and LettuceResult are now top-level classes and no longer inner classes of their connection factories.

Original pull request: #289.
2017-10-23 13:38:12 +02:00
Christoph Strobl
6ea78c77dd DATAREDIS-643 - Polishing.
Update Javadoc and remove trailing whitespaces.

Original Pull Request: #288
2017-10-20 10:25:30 +02:00
Mark Paluch
0396923d50 DATAREDIS-643 - Provide ReactiveStringRedisTemplate.
Provide a String-focused convenience class for simpler bootstrapping and to provide a dedicated bean type for the application context when using auto-configuration.

Original Pull Request: #288
2017-10-20 10:25:09 +02:00
Christoph Strobl
4d41beff31 DATAREDIS-713 - Polishing.
Added static methods for common serializers (string, json, java) to RedisSerializer.

Original Pull Request: #288
2017-10-20 10:12:59 +02:00
Mark Paluch
841d8ef447 DATAREDIS-713 - Introduce constants for commonly used StringSerializers.
We now provide constant StringSerializers for US-ASCII, ISO 8859-1 and UTF-8 encoding.

Original Pull Request: #288
2017-10-20 10:08:14 +02:00
Christoph Strobl
1e2a0f858f DATAREDIS-576 - Polishing.
Update Javadoc, apply missing @Nullable annotations, add tests and alter makefile to use Redis 4.0.2.

Original Pull Request: #285
2017-10-19 10:31:46 +02:00
Mark Paluch
5059887a76 DATAREDIS-576 - Support client name for Redis connections using Lettuce.
We now allow configuration of the client name that is applied to connections using the Lettuce driver.

LettuceClientConfiguration configuration = LettuceClientConfiguration.builder().clientName("foo-bar").build();
LettuceConnectionFactory factory = new LettuceConnectionFactory(new RedisStandaloneConfiguration(), configuration);

Fixed some typos, javadoc and method visibility along the way.

Original Pull Request: #285
2017-10-19 10:22:15 +02:00
Christoph Strobl
1d528f03f2 DATAREDIS-619 - Polishing.
Add dedicated section on executing lua scripts via the reactive infrastructure, rephrase some other parts adapt non-Javadoc comments to code style.

Original Pull Request: #280
2017-10-12 16:02:54 +02:00
Mark Paluch
e22d22a42e DATAREDIS-619 - Document reactive Redis Template.
Original Pull Request: #280
2017-10-12 16:01:51 +02:00
Mark Paluch
e64f60b6a2 DATAREDIS-619 - Housekeeping.
Remove leftovers from SRP and JRedis removal. Reference bundled Spring Framework version in documentation links. Update outdated links. Upgrade to Java 8 requirements. Order operations interfaces alphabetically (documentation, code) and update what's new section.

Original Pull Request: #280
2017-10-12 16:01:19 +02:00
Oliver Gierke
b8b091d7ce DATAREDIS-689 - Updated changelog. 2017-10-11 19:01:43 +02:00
Mark Paluch
0cfd473cd4 DATAREDIS-529 - Polishing.
Accept varargs byte arrays instead of Collection of byte arrays. Bypass own routing for exists single-slot execution in Redis Cluster. Replace parallel stream execution of exists(…) with sequential ClusterCommandExecutor dispatch.

Reorder methods in ClusterConnectionTests by name. Adapt Javadoc.

Original pull request: #281.
2017-10-11 11:47:20 +02:00
Christoph Strobl
c843269804 DATAREDIS-529 - Add support for EXISTS taking multiple keys.
Original pull request: #281.
2017-10-11 11:38:52 +02:00
Christoph Strobl
143c452313 DATAREDIS-711 - Polishing.
Retain publisher sequence by using concatMap, remove trailing whitespace, flush script cache in tests.

Original Pull Request: #282
2017-10-11 11:09:32 +02:00
Mark Paluch
a99a738314 DATAREDIS-711 - Polishing.
Strengthen non-null requirements when obtaining the native connection from LettuceReactiveRedisConnection. Guard close against multiple calls and use concatMap instead of flatMap to retain publisher sequence.

Original Pull Request: #282
2017-10-11 11:08:41 +02:00
Mark Paluch
ebc0c5e0b4 DATAREDIS-711 - Emit Lua array responses as List.
We now emit array responses from Lua script execution as complete List instead of emitting the individual elements through the Publisher.

Lua scripts may return nil (null) elements that would be not emitted through a Publisher. Skipping null values would garble up the response – and in several cases, the response array is required as List. Emitting the whole List aligns the response to the signatures imposed by generics and aligns the behavior with the imperative API.

Original Pull Request: #282
2017-10-11 11:07:52 +02:00
Mark Paluch
8adea79e67 DATAREDIS-698 - Polishing.
Eagerly initialize known commands. Preallocate Jedis response builder. Replace list concatenation with array copy. Reject null arguments in execute(). Remove inversion through collections with direct byte array creation. Reorder arguments in signatures, visibility modifiers, Javadoc.

Original pull request: #283.
2017-10-10 11:13:19 +02:00
Christoph Strobl
f6a17fb268 DATAREDIS-698 - Add support for HSTRLEN.
We now support HSTRLEN command throug RedisHashCommands for Lettuce and Jedis in both an imperative and reactive manner.

However, Jedis not natively supporting HSTRLEN via its API we’ve come up with some more reflective invocation allowing to execute commands currently not known by Jedis. We also added this behavior to the cluster implementation which as of now also supports RedisClusterConnection#execute.

Original pull request: #283.
2017-10-10 11:06:19 +02:00
Mark Paluch
9a1518cd40 DATAREDIS-691 - After release cleanups. 2017-10-02 11:37:23 +02:00
Mark Paluch
e7859c5dfc DATAREDIS-691 - Prepare next development iteration. 2017-10-02 11:37:22 +02:00
Mark Paluch
53e8a88d2d DATAREDIS-691 - Release version 2.0 GA (Kay). 2017-10-02 11:10:23 +02:00
Mark Paluch
b52c803b78 DATAREDIS-691 - Prepare 2.0 GA (Kay). 2017-10-02 11:09:17 +02:00
Mark Paluch
0f6cf8cecf DATAREDIS-691 - Updated changelog. 2017-10-02 11:09:15 +02:00
Mark Paluch
30e531dc6e DATAREDIS-705 - Polishing.
Change return type for mset from void to Boolean. Add missing Nullable annotations. Add Javadoc.

Disable flakey tests for now.

Related pull request: #279.
2017-10-02 10:14:04 +02:00
Christoph Strobl
d002445d98 DATAREDIS-705 - Change return type for set commands from void to Boolean.
Related pull request: #279.
2017-10-02 10:03:25 +02:00
Mark Paluch
f5c9e75d97 DATAREDIS-603 - Fall back to RedisSystemException for non translateable exceptions during cluster execution.
We now use a fallback exception translation strategy in JedisClusterConnection to map all non-mapped exceptions to RedisSystemException. This change prevents null pointer exceptions caused by potentially throwing null.

Original Pull Request: #275
2017-10-02 09:28:47 +02:00
Mark Paluch
2d49661e2d DATAREDIS-704 - Polishing.
Align Javadoc to actual code behavior mentioning the appropriate default shutdown duration.
2017-09-28 15:10:46 +02:00
Mark Paluch
5762287e0d DATAREDIS-704 - Upgrade to Lettuce 5.0 GA. 2017-09-28 15:08:53 +02:00
Mark Paluch
5282ebf774 DATAREDIS-703 - Upgrade to Lettuce 5 snapshots.
Upgrade to snapshot builds to adapt a version compatible with Reactor 3.1.0 GA.

Related ticket: DATAREDIS-704.
2017-09-26 11:15:57 +02:00
Mark Paluch
911b393d1e DATAREDIS-700 - Downgrade to CDI 1.0.
We now build against CDI 1.0 again while using CDI 2.0 for testing.
2017-09-21 14:01:35 +02:00
Mark Paluch
e490b959b6 DATAREDIS-701 - Added explicit automatic module name for JDK 9. 2017-09-21 14:01:02 +02:00
Mark Paluch
6cc383b10a DATAREDIS-692 - Polishing.
Add NonNullFields to packages. Add missing Nullable annotations. Extend Javadoc. Replace simple equals/hashCode methods using Lomboks EqualsAndHashCode annotation. Use RequiredArgsConstructor for private classes in favor of own constructors. Replace null-checks with qualified access whether objects are empty/applicable. Rearrange methods according to interface ordering.

Remove demo code from KeyspaceConfiguration.

Original pull request: #277.
2017-09-21 08:16:43 +02:00
Mark Paluch
5ca5e9f9c3 DATAREDIS-692 - Replace own Base64 class in favor of the JDK one.
Original pull request: #277.
2017-09-21 08:16:43 +02:00
Mark Paluch
bb6aa8acd2 DATAREDIS-692 - Deprecate Version.
Spring Data Commons provides org.springframework.data.util.Version so we no longer require to use our own one.

Original pull request: #277.
2017-09-21 08:16:01 +02:00
Christoph Strobl
1b2e74c82f DATAREDIS-692 - Introduce usage of nullable annotations for API validation.
Mark all packages with Spring Frameworks @NonNullApi. Add Spring's @Nullable to methods, parameters and fields that take or produce null values. Adapted using code to make sure the IDE can evaluate the null flow properly. Fix Javadoc in places where an invalid null handling policy was advertised. Strengthened null requirements for types that expose null-instances.

Resolve some of the inherited null invariants, align Converters to null contract.

Original pull request: #277.
2017-09-21 08:14:37 +02:00
Mark Paluch
ddb5ca7c28 DATAREDIS-700 - Polishing.
Fix line endings.
2017-09-18 15:29:50 +02:00
Mark Paluch
15535cb48a DATAREDIS-700 - Upgrade to OpenWebBeans 2.0.1. 2017-09-18 15:29:34 +02:00
Oliver Gierke
16dd807758 DATAREDIS-671 - After release cleanups. 2017-09-11 17:40:22 +02:00
Oliver Gierke
6387202d62 DATAREDIS-671 - Prepare next development iteration. 2017-09-11 17:40:19 +02:00
Oliver Gierke
e63aa3b298 DATAREDIS-671 - Release version 2.0 RC3 (Kay). 2017-09-11 17:24:46 +02:00
Oliver Gierke
b6ce2ae543 DATAREDIS-671 - Prepare 2.0 RC3 (Kay). 2017-09-11 17:23:52 +02:00
Oliver Gierke
0ce5d8d787 DATAREDIS-671 - Updated changelog. 2017-09-11 17:23:48 +02:00
Mark Paluch
49499063d8 DATAREDIS-690 - Upgrade to Lettuce 5.0 RC2. 2017-09-11 13:56:50 +02:00
Mark Paluch
3545532174 DATAREDIS-672 - Updated changelog. 2017-09-11 12:44:06 +02:00
Christoph Strobl
39c67515d3 DATAREDIS-688 - Polishing.
Remove whitespaces and add issue references.

Original Pull Request: #276
2017-09-08 14:53:58 +02:00
Mark Paluch
e3b41ffd5d DATAREDIS-688 - Polishing.
Adjust formatting for delete and sort test methods.

Original Pull Request: #276
2017-09-08 14:53:29 +02:00
Mark Paluch
1e96b8efa9 DATAREDIS-688 - Return delete result via RedisOperations.delete(…).
We now return the deletion count for multi-key deletes and whether a single key was deleted for RedisOperations.delete(…).

Original Pull Request: #276
2017-09-08 14:52:35 +02:00