Commit Graph

1068 Commits

Author SHA1 Message Date
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
Spring Buildmaster
622c383356 DATAREDIS-297 - Release version 1.3.0.RC1. 2014-05-02 06:15:26 -07:00
Thomas Darimont
497a218f08 DATAREDIS-298 - Remove not needed jcl-over-slf4j compile dependency.
Removed compile time dependency on jcl-over-slf4j.

Original pull request: #67.
2014-05-02 14:56:33 +02:00
Oliver Gierke
76a4258a66 DATAREDIS-297 - Prepared 1.3.0.RC1.
Switched to milestone repository.
2014-05-02 14:41:27 +02:00
Oliver Gierke
31947789f4 DATAREDIS-297 - Updated changelog. 2014-05-02 14:41:00 +02:00
Oliver Gierke
ec10cb40f6 DATAREDIS-297 - Improve changelog to make sure we can automate additions.
Moved the = line below the additional informations to make sure we find the right spot to add additional changelog entries when automating the release preparations.
2014-04-30 16:38:55 +02:00
Christoph Strobl
ce8d932a46 DATAREDIS-226 - Syntax exceptions using lettuce should be reported immediately.
If running in transaction mode we now do a rudimentary check if the provided number of arguments matches the ones defined for the RedisCommand to execute.

If the command passes this first check and causes an error on redis server one has to check results for Command.getOutput().hasError().

Original Pull Request: #66.
2014-04-29 13:23:20 +02:00
Christoph Strobl
bc1bbd1d39 DATAREDIS-73 - Add support for spring managed transactions.
RedisTemplate now supports enabling of transaction support, which is disabled by default.

In case of enabled transaction support the RedisConnections will be bound to the current thread during ongoing outer transactions. We call MULTI at the beginning and depending on transaction state EXEC or DISCARD at its end.

To support read operations during the transaction we wrap a proxy around the bound connection piping read operations to a new (non thread bound) connection obtained by the underlying RedisConnectionFactory.

Transaction support is available for jedis, lettuce and srp, while had to be skipped for jredis due to the lack of support for MULTI.

Original pull request: #64.
2014-04-25 13:53:36 +02:00
Christoph Strobl
4e4a2961da DATAREDIS-294 - TypedTuple should allow sorting using java sort().
Updated Comparable type information to allow usage with standard java sort.
2014-04-25 13:12:18 +02:00
icedrake
6d7c5ce9cd DATAREDIS-293 - JedisConnection, allow bulk addition with same score.
Added version check for jedis library as the operation had been introduced in 2.4.

Original Pull Request: #63
2014-04-11 11:02:31 +02:00
Spring Buildmaster
db2da6dd50 DATAREDIS-292 - Prepare next development iteration. 2014-03-31 05:40:24 -07:00
Spring Buildmaster
2040a12a8c DATAREDIS-292 - Release version 1.3.0.M1. 2014-03-31 05:40:22 -07:00
Thomas Darimont
05db8749d4 DATAREDIS-292 - Prepare release 1.3.0 M1.
Update release notes, changelog and readme.

Original pull request: #61.
2014-03-31 13:39:27 +02:00
reta
aa739f4135 DATAREDIS-289 - Avoid NPE in DefaultValueOperations#append() in case of pipelining or/and multi/exec calls.
We now return null if DefaultValueOperations#append() was applied to a non-existing list and thus returned null. Previously a NPE was thrown in case of pipelining or/and multi/exec calls.

Original pull request: #48.
2014-03-26 14:00:16 +01:00
Christoph Strobl
f366ffc94e DATAREDIS-284 - Add support for zCard to ZSetOperations.
'zCard' has been introduced in addition to 'size' as it feels more natural for people using redis. 'size' in 'ZSetOperations' / 'BoundZsetOperations' now delegate to 'zCard'.

Original Pull Request: #55
2014-03-26 13:22:55 +01:00
Christoph Strobl
d35375ec74 DATAREDIS-277 - Add support for 'SLAVEOF'.
'SLAVEOF' and 'SLAVEOF NO ONE' are available via 'RedisConnection' and 'RedisOperations' for 'jedis', 'jredis', 'lettuce' and 'srp'.

Original Pull Request: #57
2014-03-26 13:15:33 +01:00
Christoph Strobl
2b280e57e8 DATAREDIS-287 - 'setBit' should return boolean value.
SetBit now returns the original bit value stored at the offset. The result will also be added in pipeline and transaction mode which means that the final result collection may now contain more entries than in prior versions.

Original Pull Request: #58
2014-03-26 12:54:38 +01:00
Christoph Strobl
2679405e96 DATAREDIS-268 - Add support for 'CLIENT LIST'.
'RedisConnection' and 'RedisTemplate' have been extended by 'getClientList' retrieving client informations from redis. 'RedisClientInfo' provides access via specified getters as well as an more general approach directly using the keys (like 'qubuf').

The operation is available for 'jedis', 'lettuce' and 'srp'.

Original Pull Request: #53
2014-03-26 12:42:09 +01:00
Christoph Strobl
4bf438f563 DATAREDIS-270 - Add support for 'CLIENT GETNAME'.
Support for getting client connection name has been added for 'jedis', 'jredis' and 'srp' drivers.

Using 'jredis' will throw 'UnsupportedOperationException'.

Original Pull Request: #51
2014-03-26 12:05:28 +01:00
Christoph Strobl
e280a23550 DATAREDIS-269 - Add support for 'CLIENT SETNAME'.
Setting client name is possible for 'jedis', 'lettuce' and 'srp'.
Using 'jredis' throws 'UnspupportedOperationException'.

Original Pull Request: #54
2014-03-26 11:44:01 +01:00
Christoph Strobl
6a6d03eb4c DATAREDIS-267 - Add support for 'CLIENT KILL'.
Killing a client connection can be done via 'RedisConnection' and 'RedisOperations' using 'jedis', 'lettuce' and 'srp'.

We use dedicated parameters for host and port building up the redis format (host:port) for connection identification.

Original Pull Request: #56
2014-03-26 11:33:35 +01:00
Christoph Strobl
1c47330ec9 DATAREDIS-286 - Avoid overflow in JedisConnection#expire / #pexpire.
Added unit test to verify that 'time()' is called prior to 'pExpireAt'.
2014-03-24 11:29:53 +01:00
Thomas Darimont
59582f1910 DATAREDIS-286 - Avoid overflow in JedisConnection#expire / #pexpire.
Workaround Jedis issue https://github.com/xetorthio/jedis/pull/575.
We now delegate calls to expire(...) to pExpireAt(...) in case the seconds parameter is > than Integer.MAX_VALUE.
We query the server time to compute the new expiration date.

Original pull request: #52.
2014-03-24 11:28:40 +01:00