Commit Graph

1309 Commits

Author SHA1 Message Date
Mark Paluch
0ac118fcc0 DATAREDIS-315 - Support password protected Redis Cluster.
Add new config property to configure a password for operations with Redis Cluster. The only driver to support Redis Cluster with password is lettuce but 3.4.Final has a blocker bug that prevents the usage

Original pull request: #158.
2016-02-09 15:40:38 +01:00
Mark Paluch
f18def013a DATAREDIS-315 - Support Redis 3.2 CLUSTER NODES output format.
The CLUSTER NODES converter supports the formats for Redis 3.0 and Redis 3.2.

Original pull request: #158.
2016-02-09 15:40:33 +01:00
Mark Paluch
c105cbb7b6 DATAREDIS-315 - Polishing.
Update documentation and fix spelling in JavaDoc and reference documentation.

Allow node lookup by host/port and node Id to enable flexibility when passing references to Redis Cluster nodes. Parse multiple slot ranges for a cluster node and move CLUSTER NODES parser to Converters.

Use fixed line separator instead of OS-specific line separator, consolidate duplicate code, support clusterSetSlotStable with lettuce 3.4 and set lettuce driver shutdown timeout to zero for long running tests.

Original pull request: #158.
2016-02-09 15:38:52 +01:00
Christoph Strobl
c5047f40c6 DATAREDIS-315 - Add initial support for redis cluster (jedis/lettuce).
Cluster support is based on the very same building blocks as non clustered communication. RedisClusterConnection and extension to RedisConnection handles the communication with the Redis Cluster and translates errors into the Spring DAO exception hierarchy.

Redirects for to a specific keys to the corresponding slot serving node are handled by the driver libraries, higher level functions like collecting information accross nodes, or sending commands to all nodes in the cluster that are covered by RedisClusterConnection utilizing a ClusterCommandExecutor distributing commands accross the cluster and collecting results.

RedisTemplate provides access to cluster specific operations via the ClusterOperations interface that can be obtained via RedisTemplate.opsForCluster(). This allows to execute commands explicitly on a single node within the cluster while retaining de-/serialization features configured for the template.

Original pull request: #158.
2016-02-09 14:53:33 +01:00
Christoph Strobl
a6ab1b53b3 DATAREDIS-315 - Update Makefile to spin up cluster.
Original pull request: #158.
2016-02-09 14:53:31 +01:00
Christoph Strobl
4893dc1533 DATAREDIS-315 - Bump driver lib versions (jedis/lettuce).
Original pull request: #158.
2016-02-09 14:53:28 +01:00
Christoph Strobl
bc962f1c08 DATAREDIS-419 - Remove Gradle build files. Activate Maven build.
Remove Gradle related build files and update version in Maven pom.xml to reflect current development iteration.

Original Pull Request: #164
2016-02-04 19:36:09 +01:00
Christoph Strobl
1f97623a7c DATAREDIS-443 - Add Support for Spring 4.3 synchronized mode to RedisCache.
As of Spring Framework 4.3.RC1, the `Cache` interface has a new `<T> T get(Object key, Callable<T> valueLoader);` method (see SPR-9254).

If no entry for the given key is found, the `Callable` is invoked to compute/load the value that is then put into redis and returned. Additionally concurrent calls get synchronized so that the `Callable` is only called once.

Using Spring Framework 4.3 failures result in `o.s.c.Cache$ValueRetrievalException` prior versions use `RedisSystemException`.

Original pull request: #162.
2016-02-04 09:13:42 +01:00
Christoph Strobl
239d97195a DATAREDIS-405 - Deprecate support for jredis and srp.
Original pull request: #163.
2016-02-03 11:17:07 +01:00
Oliver Gierke
ea78041d57 DATAREDIS-449 - Added code of conduct.
Moved to Asciidoctor based CONTRIBUTING along the way.
2016-02-02 10:18:40 +01:00
Christoph Strobl
b6e90752e7 DATAREDIS-419 - Move project build to Maven.
- Introduce Maven pom.xml.
- Moved Asciidoctor files to src/main/asciidoc.
- Moved notice.txt etc. to src/main/resources.
- Add logback.xml
- Update Makefile to use maven and pick build profiles.
- Update template.mf to pick up versions in pom.xml
- Add build matrix for spring versions to .travis.yml
- Use container based travis infrastructure.
- Update readme.
2016-01-29 20:09:21 +01:00
Christoph Strobl
a446dd3619 DATAREDIS-448 - Fix DefaultSetOperations.intersectAndStore not returning command result.
We now properly return the number of elements in the destination set, has always been null so far, for DefaultSetOperations.intersectAndStore.
2016-01-28 07:59:32 +01:00
Oliver Gierke
2c9d8c61ea DATAREDIS-441 - Updated changelog. 2015-12-18 10:58:57 +01:00
Oliver Gierke
86850b5579 DATAREDIS-436 - Updated changelog. 2015-11-16 08:56:09 +01:00
Christoph Strobl
d078a63f4c DATAREDIS-431 - Autoselect database configured in LettuceConnectionFactory.
We now actively select the predefined db set via the dbIndex on LettuceConnectionFactory. Fixed some spelling issues along the way.

Original pull request: #157.
2015-11-15 13:37:24 +01:00
Christoph Strobl
3d7a524474 DATAREDIS-435 - Fix potential NPE in RedisTestProfileValueSource. 2015-10-27 09:30:32 +01:00
欧夺标
130c057acd DATAREDIS-417 - Fix ScanCursor throwing NoSuchElementException for empty scan result.
ScanCursor now retriggers SCAN command for results having a new cursorId but no actual values. This avoids NoSuchElementException for server calls like:

    scan 0 match key*9
      1) 1966080
      2) (empty list or set)

Original Pull Request: #154
CLA Number: 143520151016081625 (Duobiao Ou)
2015-10-16 11:31:36 +02:00
Christoph Strobl
df4ad35057 DATAREDIS-417 - Add failing tests for ScanCursor throwing NoSuchElementException.
Add failing tests for scanning key sets where Redis returns a scan iteration pointing to the next cursor but having no actual values itself like in:

    scan 0 match key*9
      1) 1966080
      2) (empty list or set)
2015-10-16 11:31:28 +02:00
Oliver Gierke
0579c3dae4 DATAREDIS-434 - Updated changelog. 2015-10-14 14:01:26 +02:00
Oliver Gierke
bc7f040e07 DATAREDIS-429 - After release cleanups. 2015-09-01 12:11:03 +02:00
Spring Buildmaster
0c1406c183 DATAREDIS-429 - Prepare next development iteration. 2015-09-01 02:32:19 -07:00
Spring Buildmaster
11e47d03ef DATAREDIS-429 - Release version 1.6.0.RELEASE (Gosling GA). 2015-09-01 02:32:17 -07:00
Oliver Gierke
ac88672d67 DATAREDIS-429 - Prepare 1.6.0.RELEASE (Gosling GA). 2015-09-01 09:44:22 +02:00
Oliver Gierke
202473d574 DATAREDIS-429 - Updated changelog. 2015-09-01 09:44:18 +02:00
Christoph Strobl
fd8ac7af42 DATAREDIS-430 - Upgrade Jackson2 to 2.6.1 2015-09-01 07:43:34 +02:00
Christoph Strobl
4e7ccc96fe DATAREDIS-424 - Update Reference Documentation.
Updated what’s new section in reference documentation.
Remove outdated version from readme.
Update project team twitter handle on readme.
2015-09-01 07:43:24 +02:00
Christoph Strobl
74ea61c51c DATAREDIS-421 - Fix NPE when using HashMapper implementations.
We now make sure the available HashMapper implementations avoid exposing null values. Prior to this null values would have been added to the converted Hash causing trouble when saving those to redis since hashes are expected to not contain any null values
2015-08-31 14:19:39 +02:00
Christoph Strobl
35424bb9da DATAREDIS-392 - Add Gerneric Jackson2 RedisSerializer.
We introduced GenericJackson2JsonRedisSerializer holding a preconfigured ObjectMapper which writes Class type informations into the JSON structure. This enables polymorphic deserialization and allows RedisCache manager to operate upon a RedisTemplate storing data in JSON format, which had until this only been possible using the Jdk Serializer.
2015-08-31 14:09:22 +02:00
Christoph Strobl
9a6a892a48 DATAREDIS-426 - Upgrade to lettuce 3.3. 2015-08-28 07:50:55 +02:00
Oliver Gierke
cf055b062a DATAREDIS-420 - After release cleanups. 2015-08-04 14:09:23 +02:00
Spring Buildmaster
3023d3f53a DATAREDIS-420 - Prepare next development iteration. 2015-08-04 04:27:29 -07:00
Spring Buildmaster
e6440dd7d1 DATAREDIS-420 - Release version 1.6.0.RC1 (Gosling RC1). 2015-08-04 04:27:26 -07:00
Oliver Gierke
a642e1bfa1 DATAREDIS-420 - Prepare 1.6.0.RC1 (Gosling RC1). 2015-08-04 13:02:49 +02:00
Oliver Gierke
4ab164b69a DATAREDIS-420 - Updated changelog. 2015-08-04 11:48:38 +02:00
Christoph Strobl
444b290863 DATAREDIS-348 - Polishing.
Fixed connection problems leaving sockets open. Added missing JUnit rules for Sentinels. Added missing author information update, license header and Javadoc.

Upgraded test script to use Redis 3.0.2. Upgrade test script to shut down Redis in case of test errors. Added Redis 3.0 to TestProfileValueSource. Enabled ZRANGEBYLEX tests for lettuce.

Original pull request: #144.
Related pull request: #104.
2015-08-04 10:12:39 +02:00
Mark Paluch
7426b27688 DATAREDIS-348 - Switch to mp911de/lettuce 3.0.
Updated lettuce redis client to latest snapshot, adopt changed API and use API for commands which were emulated using LUA script

Implemente Sentinel support using lettuce library, adopt finer grained exceptions and aligned exception behavior to match other libraries. Added shutdown-timeout property in order to control shutdown duration of the netty framework which reduces test run duration. Documentation updated as well. Contains also a fix to use psetex instead of setex (typo).

Switch to Jedis for Redis Version discovery in tests. Polished documentation. Use LettuceConverter and native time() method.

Original pull request: #144.
Related pull request: #104.
2015-08-04 10:12:39 +02:00
Oliver Gierke
4cd6b82e7b DATAREDIS-418 - Updated changelog. 2015-07-28 16:44:01 +02:00
Christoph Strobl
a08e90a1f7 DATAREDIS-414 - Serialization now occurs after pooled connection was released.
Moved key serialization and value deserialization outside of callback so that pooled connections get released more quickly.

Original pull request: #153.
2015-07-28 14:18:26 +02:00
Christoph Strobl
7073502e42 DATAREDIS-416 - RedisCache.putIfAbsent(…) now returns null for first addition.
We now return null for RedisCache.putIfAbesent(…) when value is set to meet the contract defined by org.springframework.cache.Cache.putIfAbsent(…).

Original pull request: #150.
2015-07-28 13:42:10 +02:00
Christoph Strobl
b2bae8f8fb DATAREDIS-412 - Assert compatibility with Jedis 2.7.1, 2.7.2 and 2.7.3.
Bump Jedis version and fix SendCommand class type differences between versions.

We now also lazily init the transaction on first call of multi() since pre initialization causes issues releasing Jedis connections and returning them to pool.

Original pull request: #149.
Related ticket: #139.
2015-07-22 14:39:30 +02:00
Christoph Strobl
1ad3392a72 DATAREDIS-401 - RedisCacheManager should operate on RedisOperations.
We now no longer require RedisCache and RedisCacheManager to be initialized with a RedisTemplate but use RedisOperations instead.

Original pull request: #142.
2015-07-09 19:10:13 +02:00
Andy Wilkinson
f694be772d DATAREDIS-413 - Use the latest version of the Spring IO Plugin
Spring IO Platform 2.0 will remove the managed versions .properties
file as support for it has been removed in Spring Boot 1.3.

This commit moves the build onto a new version of the Spring IO Plugin
that uses the Maven bom rather than the properties file.
2015-07-08 13:03:45 +02:00
Oliver Gierke
ab6c77c263 DATAREDIS-408 - Updated changelog. 2015-07-01 10:03:13 +02:00
Oliver Gierke
8aed73dfbe DATAREDIS-409 - Updated changelog. 2015-07-01 07:49:54 +02:00
Oliver Gierke
5afd7f5de6 DATAREDIS-410 - Updated changelog. 2015-06-30 14:29:45 +02:00
Christoph Strobl
aa04e73dbd DATAREDIS-402 - RedisCache should not expire known keys in case ttl of element is not set.
We now skip defining expire on known keys set in case element is eternal.

Original pull request: #141.
2015-06-16 09:38:54 +02:00
Oliver Gierke
281c9c58ae DATAREDIS-403 - Fixed configuration of JavaDoc task.
We now depend on the task that extracts shared resources and use the CSS provided with that.
2015-06-02 15:56:37 +02:00
Oliver Gierke
104489829f DATAREDIS-400 - After release cleanups. 2015-06-02 12:04:08 +02:00
Spring Buildmaster
9651f3d85d DATAREDIS-400 - Prepare next development iteration. 2015-06-02 01:42:04 -07:00
Spring Buildmaster
4974956b91 DATAREDIS-400 - Release version 1.6.0.M1 (Gosling M1). 2015-06-02 01:42:02 -07:00