Commit Graph

1060 Commits

Author SHA1 Message Date
Oliver Gierke
02ab48fb34 DATAREDIS-322 - Updated changelog. 2014-07-25 06:22:21 +02:00
Thomas Darimont
a3d084fd1a 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:19:33 +02:00
Christoph Strobl
eab3804a90 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-10 07:10:59 +02:00
Oliver Gierke
d3cf3e8052 DATAREDIS-320 - After release cleanups. 2014-06-30 16:47:28 +02:00
Spring Buildmaster
0e20f02e30 DATAREDIS-320 - Prepare next development iteration. 2014-06-30 07:43:58 -07:00
Spring Buildmaster
ab6b0ab17b DATAREDIS-320 - Release version 1.3.1.RELEASE (Dijkstra SR1). 2014-06-30 07:43:55 -07:00
Oliver Gierke
660a89e32c DATAREDIS-320 - Updated changelog. 2014-06-30 15:01:16 +02:00
Thomas Darimont
e876d93f96 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:51:50 +02:00
Christoph Strobl
7115bf290e DATAREDIS-307 - Add missing reference documentation for managed transactions.
Added explanation and code samples.

Original pull request: #75.
2014-05-21 14:02:13 +02:00
Thomas Darimont
0de9705fd1 DATAREDIS-301 - Prepare next development iteration. 2014-05-21 13:09:02 +02: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
Christoph Strobl
408b52a449 DATAREDIS-261 - Upgrade to commons-pool2.
'JRedisPool' and 'DefaultLettucePool' have been migrated to 'commons-pool2'.

'PoolConfig' has been deprecated, and will be removed in '1.4', as all required operations are available via 'GenericObjectPoolConfig'.

Along the way a minor bug within 'LettuceConnection' has been resolved, which prevented 'RedisAsyncConnections' from being properly closed/returned to pool.

Original Pull Request: #50
2014-03-20 13:07:05 +01:00
Christoph Strobl
d116d3825a DATAREDIS-184 - Add support for 'SAVE/NOSAVE' to shutdown.
Created and added 'ShutdownOptions' to 'RedisServerCommands'. The full implementation is available for 'lettuce' and 'srp'.

When using 'jedis' the command is emulated using lua script via 'eval'.

For 'jredis' the method is not available and will throw 'UnsupportedOperationException'.

Original Pull Request: #47
2014-03-20 12:49:41 +01:00
Christoph Strobl
4b2ccbecb9 DATAREDIS-271 - Add support for 'pSetEx'.
Support for 'pSetEx' has been added for 'jedis' & 'srp'.
For 'lettuce' the command is emulated using 'eval'.

There is no support for 'pSetEx' when using 'jredis'.

'DefaultValueOperations.set' used with 'TimeUnit.MILLISECONDS' will fallback to 'setEx' in case 'pSetEx' is not supported by the driver in use.

Original pull request: #46.
2014-03-20 12:36:09 +01:00
Christoph Strobl
a3ac8d0899 DATAREDIS-285 - LettuceConnection.execute should fully read response.
'LettuceConnection' used 'ByteArrayOutput' as default for execute which did not fully read all values that might be included in the response.

To overcome this issue 'TypeHints' have been added which map a given 'CommandType' to the most recent 'CommandOutput'.  As not all commands could be mapped that way due to the result depending on input parameters in some cases, it might be required to manually provide the type hint when calling execute.

Additional tests have been added to assert 'execute' works properly for 'jedis', 'jredis' and 'srp'.

Original Pull Request: #49
2014-03-19 11:26:19 +01:00
Thomas Darimont
9cf484d25a DATAREDIS-283 - RedisCacheManager.loadCaches overrides already defined cache names in afterPropertiesSet().
We now retain the potentially already configured caches during the initialisation of the RedisCacheManager bean. Previously we discarded the already configured caches which was an undesired side-effect.

Original pull request: #45.
2014-03-13 06:33:37 +01:00
Thomas Darimont
ec2a760dd6 DATAREDIS-275 - Rename RedisServerCommands.bgWriteAof to bgReWriteAof.
Renamed method and placed @Deprecated delegate-Methods in order to avoid breaking clients.

Original pull request: #44.
2014-03-10 09:00:01 +01:00
Spring Buildmaster
86205e3b67 DATAREDIS-256 - Prepare next development iteration. 2014-03-03 05:48:34 -08:00
Thomas Darimont
0f8c68c251 DATAREDIS-282 - PubSubResubscribeTests should use jedis without pool.
Disabled jedis pooling in PubSubResubscribeTests since all the other tests also don't use a pool.

Original pull request #43.
2014-03-03 14:36:06 +01:00