Commit Graph

1090 Commits

Author SHA1 Message Date
Christoph Strobl
c6b2ba75af DATAREDIS-336 - Copy styles to output dir.
Upgraded to Asciidoctor 1.5.0. We now cheat on Gradle docbook-reference-plugin by directly copying files to reference work dir to bypass expanding files. Create an empty source folder so that the plugin does not fail.

Original pull request: #94.
2014-09-04 08:44:47 +02:00
Greg Turnquist
fe6b75ee2a DATAREDIS-336 - Fine tune build process and formatting.
Original pull request: #94.
2014-09-04 08:44:47 +02:00
Christoph Strobl
5f638fdda3 DATAREDIS-336 - Move to Asciidoctor for reference documentation.
Add Asciidoctor plugin to Gradle. Reformat and extract some content of files that could not be parsed. Added already converted files.

Original pull request: #94.
2014-09-04 08:44:47 +02:00
Oliver Gierke
81a14b6c02 DATAREDIS-336 - Removed old docbook reference documentation.
Original pull request: #94.
2014-09-04 08:44:47 +02:00
Oliver Gierke
fdfd7fe6e7 DATAREDIS-338 - After release cleanups. 2014-08-13 16:29:32 +02:00
Spring Buildmaster
fc303bd878 DATAREDIS-338 - Prepare next development iteration. 2014-08-13 07:26:45 -07:00
Spring Buildmaster
6ff22117b1 DATAREDIS-338 - Release version 1.4.0.RC1 (Evans RC1) 2014-08-13 07:26:41 -07:00
Oliver Gierke
0b272103bc DATAREDIS-338 - Prepare 1.4.0.RC1 (Evans RC1). 2014-08-13 15:05:22 +02:00
Oliver Gierke
20455758de DATAREDIS-338 - Updated changelog. 2014-08-13 15:05:17 +02:00
Oliver Gierke
c442a785ff DATAREDIS-331 - Updated changelog. 2014-08-13 11:04:24 +02:00
Thomas Darimont
5abfa8716e DATAREDIS-337 - Improve handling of overridden methods in MessageListenerAdapter.
Previously overriding message handler methods of the delegate passed to MessageListenerAdapter resulted in the message handler method called multiple times. We now make sure that a message handler method is only found and invoked  once.

Original pull request: #95.
2014-08-13 08:53:49 +02:00
Christoph Strobl
c92829f0e2 DATAREDIS-335 - Upgrade to jedis 2.5.2.
Original pull request: #93.
2014-08-11 09:48:40 +02:00
Christoph Strobl
fd361a1868 DATAREDIS-330 - Add support for SENTINEL commands.
add support for commands:
  SENTINEL FAILOVER master
  SENTINEL SLAVES master
  SENTINEL REMOVE name
  SENTINEL MONITOR name ip port quorum

Original pull request: #92.
2014-08-11 09:12:12 +02:00
Christoph Strobl
55ff415a71 DATAREDIS-324 - Add Redis Sentinel support.
We’ve added RedisSentinelConfiguration holding required information for connecting to redis sentinels. This can be used to set up ConnectionFeactory for HA environments.

**Using Jedis**
Providing RedisSentinelConfiguration will force the JedisConnectionFactory to use JedisSentinelPool for managing resources.

**Using Lettuce/JRedis/SRP**
There’s currently no support for sentinel in those clients.

**CI Build**
We’ve added makefile to build and set up redis instances for testing sentinel support on travis-ci. There’s already a section for redis cluster.
The cluster section is for whatever reason currently not working as the cluster nodes won’t start.
This will be fixed when we add redis-cluster support.

_side note:_ there’s an alternative fork of lettuce at mp911de/lettuce that already has sentinel support.
2014-08-05 09:00:15 +02:00
Jungtaek Lim
c36a58da7f DATAREDIS-333 - Use binary version of Jedis.evalsha()
* JedisConnection.eval() uses binary version of Jedis.eval()
* but JedisConnection.evalsha() uses string version of Jedis.evalsha()
* this commit changes JedisConnection.evalsha() to use binary version of Jedis.evalsha()

---

Original Pull Request: #91
CLA: 88220140729064528 (Jungtaek Lim)
2014-07-31 07:14:47 +02:00
Thomas Darimont
b7d8eacdcf DATAREDIS-327 - Improve exception handling for all supported clients.
We now consistently return null in implementations of RedisConnectionFactory#translateExceptionIfPossible(RuntimeException ex)
in cases where we cannot translate the given exception into a more meaningful one complying with the spec of PersistenceExceptionTranslator. Introduced the ExceptionTranslationStrategy abstraction which allows to customise the translation of exceptions through the implementations PassThroughExceptionTranslationStrategy which returns null iif the Exception could not be translated and FallbackExceptionTranslationStrategy which returns a RedisSystemException wrapping the original Exception if it couldn't be translated properly.

This fix also solves the issues DATAREDIS-295, DATAREDIS-325, DATAREDIS-326.

Original pull request: #90.
2014-07-23 14:09:19 +02:00
Oliver Gierke
fc59f35599 DATAREDIS-322 - After release cleanups. 2014-07-10 20:40:44 +02:00
Spring Buildmaster
4c3419c363 DATAREDIS-322 - Prepare next development iteration. 2014-07-10 11:16:47 -07:00
Spring Buildmaster
12503a9c3d DATAREDIS-322 - Release version 1.4.0.M1. 2014-07-10 11:16:43 -07:00
Oliver Gierke
d8d3b81dd1 DATAREDIS-322 - Prepare 1.4.0.M1 (Evans M1). 2014-07-10 17:14:50 +02:00
Oliver Gierke
d2f9f1d650 DATAREDIS-322 - Updated changelog. 2014-07-10 17:14:44 +02:00
Oliver Gierke
4899ac3c8a DATAREDIS-320 - Updated changelog. 2014-07-10 17:11:43 +02:00
Christoph Strobl
3f2fbd396c DATAREDIS-321 - Adapt to Spring 4 upgrade.
Set minimum version dependency to 4.0.6.RELEASE.
2014-07-10 10:48:19 +02:00
Christoph Strobl
81b3b427dc DATAREDIS-323 - Remove links to forum.spring.io.
Point links to spring-data and spring-data-redis tags on stackoverflow.

Original Pull Request: #86
2014-07-09 21:30:42 +02:00
Thomas Darimont
ef3f6e9034 DATAREDIS-310 - Eagerly serialise key and value in RedisCache.
We now serialise the key and value before trying to acquire the lock to make sure that the given key and value are written in state they were at method invocation time.

Original pull request: #85.
2014-06-30 09:40:15 +02:00
Thomas Darimont
5f48ea8ed4 DATAREDIS-317 - Report inappropriate RedisTemplate more eagerly in RedisAtomic wrappers.
We now validate the given RedisTemplate in the constructor of RedisAtomicLong/RedisAtomicInteger/RedisAtomicDouble to report an inappropriate RedisTemplate more eagerly.

Original pull request: #83.
2014-06-30 08:13:26 +02:00
Christoph Strobl
42ff3ee1e1 DATAREDIS-314 - Add SCAN commands to Collection types.
Add scan to RedisMap / RedisSet / RedisZSet.
Lua scritps have to be assembled in binary way in order to avoid script errors when executing.
Add missing rules/profiles to run properly in a 2.6.x redis environment.

Original pull request: #82.
2014-06-17 10:18:28 +02:00
Christoph Strobl
7b3a358752 DATAREDIS-313 - Overhaul SCAN, HSCAN, SSCAN, ZSCAN operations.
Unify naming and return types.
Update supported commands documentation.
Remove key from BoundHashOperations and use getKey() instead.
Prevent error when trying to read values when there are no values present.
2014-06-12 08:20:31 +02:00
Christoph Strobl
d8b53a4c96 DATAREDIS-313 - Overhaul SCAN, HSCAN, SSCAN, ZSCAN operations.
Unify naming and return types. Update supported commands documentation. Remove key from BoundHashOperations and use getKey() instead.

Original pull request: #81.
2014-06-10 16:10:28 +02:00
Christoph Strobl
c939c8a9ff DATAREDIS-306 - Add support for ZSCAN.
ZSCAN is directly supported by jedis and can be emulated for lettuce via eval.

SRP and JRedis will throw UnsupportedOperationException.

Original pull request: #80.
2014-06-06 01:15:26 +02:00
Christoph Strobl
f6e88989f1 DATAREDIS-312 - Add travis-ci configuration.
setup travis to start a redis-server and test against java 6/7/8.
2014-06-03 12:01:59 +02:00
Christoph Strobl
ba88249188 DATAREDIS-305 - Add support for HSCAN.
HSCAN is directly supported by jedis and can be emulated for lettuce via eval.

SRP and JRedis will throw UnsupportedOperationException.

We have modified the ScanCursor implementation to take Collection instead of List.

Currently naming for scan commands is not consistent for scan, sscan and hscan. There’s a clean up task for those commands when done with all scan related commands.

Original pull request: #78.
2014-06-03 11:50:55 +02:00
Thomas Darimont
1831ae9db7 DATAREDIS-296 - Upgrade jedis to recent version.
Upgrading to latest jedis version 2.5.1. Added new conversion for Long to byte[] in JedisConverters to be able to convert long cursorIds to byte[].

Original pull request: #77.
2014-06-02 08:27:43 +02:00
Thomas Darimont
29e70b8cd8 DATAREDIS-309 - Refactor test profiles to support more than 2 versions.
We’ve added a customized SpringJUnit4Runner and TestRule that allow us to use a more relaxed strategy when dealing with @IfProfileValue. Basically we have added ‘+’ as sort of wildcard indicating tests should be executed for version X and all its successor.

This allows us to run test valid starting 2.6 for 2.8 as well, while those only valid for 2.8 are not executed against eg. redis 2.6.17.

Fixed compile error in ScanCursor with Java 6.

Orignal pull request: #76.
2014-05-28 18:24:37 +02:00
Christoph Strobl
34d1759b4e DATAREDIS-304 - Add support for SSCAN command.
SSCAN command is natively supported by jedis and can be emulated for lettuce.
JRedis and SRP will throw UnsupportedOperationException.

sScan is available on RedisConneciton and RedisSetOperations returning basically a Cursor that allows iteration over the defined values for a given key.

Currently the jedis driver does not directly expose the binary version of sscan which leads to invalid results when using a non String compatible converter along with the RedisTemplate. We’ll change this as soon as a newer version of jedis is available.

Along the way loading behavior of ScanCursor has been fixed, preventing it from indicating next values available when there effectively are no more.

Orignal pull request: #76.
2014-05-28 14:34:18 +02:00
Thomas Darimont
5f4e9db01a DATAREDIS-311 - Add test summary output to the build. 2014-05-28 11:53:52 +02:00
Christoph Strobl
d427928386 DATAREDIS-290 - Add support for SCAN command.
SCAN is currently only supported by jedis but can be emulated for
lettuce via eval.
Srp and JRedis will respond with UnsupportedOperationException.

We provide a Cursor implementation allowing to scroll through the
responses provided by the underlying connection. The cursor will fetch
additional results from redis server whenever its starting point has not
been reached and there are no more already loaded items available.

Only values returned by the last call to redis server are kept in memory
which allows scrolling through the entire collection without potentially
running into memory issues.

Original pull request: #71.
2014-05-23 14:07:11 +02:00
Christoph Strobl
3414d2a837 DATAREDIS-307 - Add missing reference documentation for managed transactions.
Added explanation and code samples.

Original pull request: #75.
2014-05-21 14:00:45 +02:00
Oliver Gierke
69e7be1fc4 DATAREDIS-301 - After release cleanups. 2014-05-20 19:43:57 +02:00
Spring Buildmaster
ba0fbc2a2f DATAREDIS-301 - Prepare next development iteration. 2014-05-20 09:49:51 -07:00
Spring Buildmaster
53a3147517 DATAREDIS-301 - Release version 1.3.0.RELEASE. 2014-05-20 09:49:41 -07:00
Oliver Gierke
21aaa31e17 DATAREDIS-301 - Prepare 1.3 GA. 2014-05-20 16:26:45 +02:00
Oliver Gierke
32d0277ffb DATAREDIS-301 - Updated changelog. 2014-05-20 16:26:39 +02:00
Christoph Strobl
937ccdc428 DATAREDIS-303 - Upgrade to Spring 3.2.9.
Move baseline to Spring 3.2.9.
2014-05-20 15:00:50 +02:00
Christoph Strobl
b01fa9fd71 DATAREDIS-302 - Undo breaking change in DecoratingStringHashMapper.
The introduced generic types prevent the DecoratingStringHashMapper from being useful as it can now only be created for mappers of the generic type which was not the original intention.

This breaks the retwis-j sample as well as it seems other implementations see: b0c0d23.

Original pull request: #73.
2014-05-20 11:32:24 +02:00
Andy Wilkinson
bdea1051de DATAREDIS-299 - Assert compatibility with Spring IO.
Upgrade to JUnit 4.11

Upgrade to JUnit 4.11 and remove use of a matcher in an internal
package in favour of the Hamcrest equivalent. To avoid a clash between
JUnit 4.11's Hamcrest dependency and the version of Hamcrest that's
bundled in mockito-all, use of mockito-all has been replaced with
mockito-core

Add the Spring IO plugin

Configure the Spring IO plugin such that it's only applied when the
build is run with -PplatformVersion=<version>. This platformVersion
property is used to determine the version of the Platform that will
be used when running the springIoCheck task. The plugin can be used
by running a build as follows:

./gradlew clean springIoCheck -PplatformVersion=1.0.0.BUILD-SNAPSHOT -PJDK7_HOME=… -PJDK8_HOME=…

This will test the project on JDK7 and JDK 8 using the dependencies
defined in the latest snapshot of Spring IO Platform 1.0.0.

Address Java 6 compilation problem

The JUnit and Hamcrest upgrades caused a compilation error on Java 6
due to a bug in the compiler’s handling of generics. This commit adds
more type information to help to guide the compiler around the problem.

Additionally, deprecation warnings caused by the JUnit and Hamcrest
upgrades have also been addressed.

Original pull request: #72.
2014-05-19 09:59:06 +02:00
Christoph Strobl
c38c5f3c09 DATAREDIS-300 - Fix inconsistency with connection open() and close().
Redis connections have been left open when calling RedisTemplate.execute as the connection might have been bound to a thread, released but never been unbound. We now only bind and unbind connections in case of enabled transaction support, while just getting and releasing it for all other purposes.

Original pull request: #69.
2014-05-16 14:22:06 +02:00
Thomas Darimont
d17fc510a3 DATAREDIS-292 - Updated change log for 1.3.0 M1.
Update changelog.

Original pull request: #61.
2014-05-05 13:03:43 +02:00
Oliver Gierke
1044bfba3e DATAREDIS-297 - After release cleanups. 2014-05-02 15:46:50 +02:00
Spring Buildmaster
e8259cc010 DATAREDIS-297 - Prepare next development iteration. 2014-05-02 06:15:29 -07:00