Commit Graph

1423 Commits

Author SHA1 Message Date
Mark Paluch
771c4d96da DATAREDIS-622 - After release cleanups. 2017-05-09 11:34:42 +02:00
Mark Paluch
24565a1632 DATAREDIS-622 - Prepare next development iteration. 2017-05-09 11:34:41 +02:00
Mark Paluch
ae2868cd11 DATAREDIS-622 - Release version 2.0 M3 (Kay). 2017-05-09 11:23:00 +02:00
Mark Paluch
7f22a6c434 DATAREDIS-622 - Prepare 2.0 M3 (Kay). 2017-05-09 11:22:12 +02:00
Mark Paluch
9776012449 DATAREDIS-622 - Updated changelog. 2017-05-09 11:22:10 +02:00
Christoph Strobl
00c433c74f DATAREDIS-640 - Adapt to API changes in repository interfaces.
We now follow a more consistent naming scheme for the methods in repository that are driven by the following guidelines:

* Methods referring to an identifier now all end on …ById(…).
* Methods taking or returning a collection are named …All(…)

Please see DATACMNS-944 for details.
2017-05-03 18:05:01 +02:00
Mark Paluch
abea6fdef2 DATAREDIS-642 - Upgrade to Lettuce 5.0 M2. 2017-05-03 14:39:07 +02:00
Mark Paluch
1216134ce2 DATAREDIS-637 - Shut down connection-exclusive ClusterCommandExecutor.
We now shut down ClusterCommandExecutor via LettuceClusterConnection and JedisClusterConnection if the ClusterCommandExecutor was created through the connection instance. In such case ClusterCommandExecutor is managed through Lettuce/JedisClusterConnection and disposed on connection close.

Previously ClusterCommandExecutor created through a ClusterConnection was not disposed.

Original pull request: #247.
2017-05-03 14:23:20 +02:00
Mark Paluch
4e2fb1b7a0 DATAREDIS-626 - Polishing.
Refactor server and scripting commands to their own implementations and interfaces.

Fix JavaDoc indentations. Fix typos. Replace explicit type arguments with diamond syntax. Replace anonymous inner classes with method references and lambdas, where possible. Use shared ClientResources with LettuceConnectionFactory tests.

Align reactive command implementation visibility with blocking command implementation visibility to package-protected. These implementations are not an extension point and subject to be used through their interfaces.

Original pull request: #247.
2017-05-03 14:23:13 +02:00
Christoph Strobl
c636400104 DATAREDIS-626 - Refactor RedisConnection implementations to Redis feature-specific interfaces.
We refactored JedisConnection and LettuceConnection from monolithic connection classes into modular classes that organize methods according the Redis feature group and created segregated interfaces per Redis feature group. Segregated interfaces reduce the number of methods available on the interface to the used data type. This refactoring reduces the responsibility of JedisConnection/LettuceConnection and JedisClusterConnection/LettuceClusterConnection to a minimum of commands.

To preserve backwards-compatibility with users of the connection classes, we introduced DefaultedRedisConnection and DefaultedRedisClusterConnection to forward calls from the connection facade to the specific implementation. Deprecation of connection facade method assists migration off these methods towards using methods on the feature group interface.

LettuceConnection connection = …

connection.keyCommands().del(key);

connection.hashCommands().hSet(key, field, value);

Original pull request: #247.
2017-05-03 14:23:01 +02:00
Mark Paluch
016af63dd4 DATAREDIS-636 - Adapt to Range API changes.
Related ticket: DATACMNS-1050.
2017-04-26 18:21:24 +02:00
Mark Paluch
dfbdd95fda DATAREDIS-634 - Polishing.
Enable Keyspace events in RedisKeyValueAdapterTests. Depending on the test order, Redis might miss the required notify-keyspace-events configuration.
2017-04-24 16:17:07 +02:00
Mark Paluch
cd789f9722 DATAREDIS-634 - Adapt to moved CustomConversions to Spring Data Commons.
Introduce RedisCustomConversions extending o.s.d.convert.CustomConversions.

Remove o.s.d.mongo.core.convert.CustomConversions implementation code and utility classes and let it extend RedisCustomConversions. Replace references to o.s.d.r.c.c.CustomConversions with o.s.d.convert.CustomConversions. Adapt tests.

Introduce constructors for ObjectHashMapper and RedisKeyValueAdapter requiring o.s.d.convert.CustomConversions and deprecate constructors accepting o.s.d.r.c.c.CustomConversions.

Related ticket: DATACMNS-1035.
2017-04-24 14:50:38 +02:00
Mark Paluch
be74bbebde DATAREDIS-633 - Adapt to renamed KeyValueQuery.getCriteria() method.
Original Pull Request: #246
2017-04-24 10:38:28 +02:00
Oliver Gierke
db72361056 DATAREDIS-628 - Updated changelog. 2017-04-19 21:04:20 +02:00
Oliver Gierke
91a0e03528 DATAREDIS-627 - Updated changelog. 2017-04-19 20:01:49 +02:00
Mark Paluch
0898bbbbe9 DATAREDIS-629 - Polishing.
Replace new PageRequest(…) with PageRequest.of(…).
2017-04-19 15:41:12 +02:00
Mark Paluch
eeac253c06 DATAREDIS-629 - Adopt changed Mono and Flux error handling API.
Replace Flux/Mono.onErrorResumeWith(…) with Flux/Mono.onErrorMap(…) and turn translateException into a method returning a mapping function instead of a reactive type emitting the mapped exception. Replace otherwiseIfEmpty(…) with switchIfEmpty(…) and otherwiseReturn(…) with onErrorReturn(…).
2017-04-19 15:33:15 +02:00
Oliver Gierke
89ae33f8c8 DATAREDIS-608 - Updated changelog. 2017-04-19 13:04:10 +02:00
Oliver Gierke
2c731c241e DATAREDIS-607 - Updated changelog. 2017-04-19 11:50:50 +02:00
Mark Paluch
31e0c39c41 DATAREDIS-613 - Polishing.
Simplify next().flatMapMany(…) to flatMap(…).

Original pull request: #244.
2017-04-13 10:32:47 +02:00
Christoph Strobl
42c87e24f9 DATAREDIS-613 - Stream results instead of returning collections where possible.
Allow streaming where possible without breaking Redis API contract. This means we keep the list collection for those operations potentially returning NULL to indicate a value is not present but was requested (eg MGET).

Additionally remove the Spring 4 related travis builds.

Original pull request: #244.
2017-04-13 10:32:16 +02:00
Christoph Strobl
87d6aa2042 DATAREDIS-624 - Upgrade to Lettuce 5.0.0.BUILD-SNAPSHOT.
Upgrade to Lettuce using Reactor 3.1.0.BUILD-SNAPSHOT, requires change to io.lettuce:lettuce-core, so we also needed to change imports from com.lambdaworks.redis to io.lettuce.core.

Original pull request: #245.
2017-04-12 14:32:41 +02:00
Christoph Strobl
2c14460643 DATAREDIS-624 - Upgrade to Reactor 3.1.0.BUILD-SNAPSHOT.
Translate `Mono.then` -> `flatMap`, `Mono.flatMap` -> `flatMapMany`.
This still fails as we also need a compatible version of lettuce.

Original pull request: #245.
2017-04-12 14:32:18 +02:00
Oliver Gierke
04e3465081 DATAREDIS-597 - Updated changelog. 2017-04-10 14:50:15 +02:00
Oliver Gierke
a09d0ba629 DATAREDIS-573 - After release cleanups. 2017-04-04 22:08:19 +02:00
Oliver Gierke
c7ea1f2c2b DATAREDIS-573 - Prepare next development iteration. 2017-04-04 22:08:16 +02:00
Oliver Gierke
03bc21edaa DATAREDIS-573 - Release version 2.0 M2 (Kay). 2017-04-04 21:12:35 +02:00
Oliver Gierke
9bcb4a9b36 DATAREDIS-573 - Prepare 2.0 M2 (Kay). 2017-04-04 21:12:02 +02:00
Oliver Gierke
ba70941760 DATAREDIS-573 - Updated changelog. 2017-04-04 21:11:59 +02:00
Christoph Strobl
07984271d8 DATAREDIS-602 - Polishing.
Remove mutable state from `ReactiveRedisTemplate`.
Set up required args constructors for passing `RedisSerializationContext` and `ConnectionFactory` while removing `InitializingBean` and `ClassLoaderAware` interfaces forcing the template to hold mutable state.
Introduced some tiny static helpers for creating `RedisSerializationContext` from Serializers and added defaulting.

Moving forward `RedisTemplate` should also be migrated to using the SerializationContext getting rid of mutable state.

Additionally some minor renames, JavaDoc updates and refactored methods to lambda style.

Original Pull Request: #239
2017-04-03 18:32:48 +02:00
Mark Paluch
81657c530b DATAREDIS-602 - Provide Reactive Redis Template.
Add ReactiveRedisTemplate, add tests abd add SerializerFunction and DeserializerFunction for functional Redis argument serialization.

Introduce ReactiveRedisConnectionFactory and remove reactive RedisConnectionFactory methods to break the dependency to reactive types. We now no longer require Project Reactor for blocking Redis use. ReactiveRedisTemplate accepts ReactiveRedisConnectionFactory to operate on a reactive connection. The only implementation of ReactiveRedisConnectionFactory is LettuceConnectionFactory which requires by default Project Reactor.

Original Pull Request: #239
2017-04-03 18:30:48 +02:00
Mark Paluch
bf1a7ac8a3 DATAREDIS-618 - Polishing.
Remove superfluous line breaks and trailing whitespaces. Create dedicated tests for RedisServer.

Original pull request: #241.
2017-03-31 11:11:11 +02:00
Franjo Zilic
f377d2c35d DATAREDIS-618 - Read number of sentinels via RedisServer from num-other-sentinels.
We now read values for NUMBER_OTHER_SENTINELS to using num-other-sentinels. Previously, the property key was multi.

Original pull request: #241.
2017-03-31 10:58:43 +02:00
Christoph Strobl
88bd5e3c33 DATAREDIS-595 - Adapt to API changes after Mockito 2.7 upgrade. 2017-03-24 10:14:31 +01:00
Christoph Strobl
d772c9dac4 DATAREDIS-595 - Adapt to API changes in Spring Data Commons. 2017-03-24 10:14:23 +01:00
Christoph Strobl
00b4009553 DATAREDIS-595 - Integrate DATACMNS Java 8 upgrade.
Integrate DATACMNS-867 and DATAKV-159 branches.
2017-03-24 10:14:06 +01:00
Mark Paluch
d0e52dd9f0 DATAREDIS-617 - Polishing.
Split serializer documentation into multiple paragraphs. Reformat test parameter provider classes.

Original pull request: #240.
2017-03-13 09:47:58 +01:00
Christoph Strobl
f8eb3134e2 DATAREDIS-617 - Remove dependency to org.codehaus.jackson.
Remove already deprecated jackson 1 dependency and related RedisSerializer / HashMapper implementations.

Original pull request: #240.
2017-03-13 09:47:44 +01:00
Christoph Strobl
202bee64a2 DATAREDIS-606 - Follow along cache contract not allowing misuse of put null value as cache evict strategy.
Adapted test to reflect intended behavior change.
2017-03-03 14:37:23 +01:00
Oliver Gierke
102b437c3f DATAREDIS-598 - Updated changelog. 2017-03-02 11:11:06 +01:00
Christoph Strobl
b749ae0c9c DATAREDIS-599 - Remove references to single-argument assertion methods of Spring. 2017-02-01 15:04:27 +01:00
Oliver Gierke
3e6235dab9 DATAREDIS-586 - Updated changelog. 2017-01-26 12:12:38 +01:00
Oliver Gierke
c7bb13ecf0 DATAREDIS-587 - Updated changelog. 2017-01-26 12:12:10 +01:00
Christoph Strobl
d7ba2a6ac2 DATAREDIS-594 - Update "what’s new" section in reference documentation. 2017-01-23 08:37:09 +01:00
Mark Paluch
35bc928fc7 DATAREDIS-593 - Use Enum.name() to represent enum values.
We now serialize Enum values using their name (Enum.name()) instead of using their string representation (Enum.toString()). toString can be customized in Enums to no longer report their name but a different value. A customized value cannot be used to reinstantiate the Enum value, only its name.

This change affects serialization and will only affect new/updated values. Stored values with a customized toString representation still can't be deserialized until they were updated in Redis.

Original Pull Request: #235
2017-01-20 11:30:47 +01:00
Mark Paluch
78d6d1169e DATAREDIS-592 - Simplify test code in RedisCacheUnitTests.
Remove superfluous `times(1)` declaration in mock verification.

Original Pull Request: #234
2017-01-20 10:22:11 +01:00
Mark Paluch
d3a0c34904 DATAREDIS-592 - Consider expiry timeout in synchronized RedisCache mode.
We now consider the element expiry when retrieving cache elements with a value loader. Previously, all cache elements that were cached using `@Cacheable(sync=true)` or used `RedisCache.get(Object, Callable)` directly were considered eternal without setting a TTL.

Original Pull Request: #234
2017-01-20 10:21:53 +01:00
Mark Paluch
5d7b057469 DATAREDIS-591 - Update project documentation with the CLA tool integration. 2017-01-13 11:50:20 +01:00
Christoph Strobl
9b6ff3779c DATAREDIS-564 - Polishing.
Remove white spaces, update license header.
Add ticket reference to existing testcase.

Original Pull Request: #228
2017-01-13 10:29:55 +01:00