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.
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.
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.
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.
'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
'SLAVEOF' and 'SLAVEOF NO ONE' are available via 'RedisConnection' and 'RedisOperations' for 'jedis', 'jredis', 'lettuce' and 'srp'.
Original Pull Request: #57
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
'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
Support for getting client connection name has been added for 'jedis', 'jredis' and 'srp' drivers.
Using 'jredis' will throw 'UnsupportedOperationException'.
Original Pull Request: #51
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
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.
'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
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
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.
'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
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.
Corrected typos and added copyright information.
Updated sync nature for subscriptions using RMLC.
Added RedisTemplate command reference.
Added include-fallback to appendix-schema reference.
Original pull request: #41.
Updated links in javadoc. Added API javadoc with references to the redis commands. Updated reference manual. Updated Readme and contributing guide.
Updated (SCM and developer information in) gradle build and template.mf bundle manifest.
Original pull request: #38
Enhanced RedisServerCommands to reflect time operation and added empty implementation to recent RedisConnection abstractions.
Added implementation of time() for Srp, Jedis, Lettuce (emulated via eval).
Added UnsupportedOperation of time() JRedis since it doesn't support time command or sending scripts or sending raw commands via the underlying connection.
Added implementation for DefaultStringRedisConnection to delegate time() operation to native connection.
Added integration test to abstract base class. Ignored the test for those connections not supporting time command.
Original pull request: #34
By default RedisCacheManager lazily initializes RedisCaches when requested. To put it into static mode a defined set of cache names has to be passed to the CacheManager.
We changed the implementation so it makes use of AbstractTransactionalCache introduced in Spring 3.2 which properly registers caches. Additionally the loadRemoteCachesOnStartup switch allows to retrieve and initialize existing caches by loading keys form redis server.
Further on RedisCacheManager can be set in transaction aware mode so that values are only put into cache after successful commit of surrounding transaction.
Original pull request: #33
Jedis upgraded from commons-pool to commons-pool2. Required changes have been introduced. Currently there are both commons-pool and commons-pool2 in class-path which is no problem as those dependencies are optional.
Original pull request: #31
The issue has already been fixed in DATAREDIS-242 (see PR: #25), which now allows to reenable the previously failing test.
Additionally the tests now run against all supported client libraries except JRedis which does not support 'publish'.
Original pull request: #30
RedisMessageListenerContainer did not properly close connections if the subscription was canceled immediately after staring the container. Since DARAREDIS-242 the container waits for the subscription to complete and therefor no more connections remain open.
Additionally added missing parameters to run tests with JRedis.
Original pull request: #29
We run into an infinite loop in org.springframework.data.redis.support.collections.CollectionUtils.rename(K, K, RedisOperations<K, ?>) if no value was associated with the key which leads to operations.hasKey(...) always returning false which prevents the actual renaming. RedisCollections will only send rename command if values are present as empty collections cannot be stored and therefor cannot be renamed.
Original pull request: #28
DefaultLettucePool manages a RedisClient instance that's created
when afterPropertiesSet is called. The client was not being shutdown
as part of the pool's destroy() processing leading to a resource leak.
On OS X this would manifest itself as a growing number of kqueue file
descriptors being consumed eventually leading to a failure when
something tries to get a file descriptor and is unable to do so.
This commit updates destroy() to call the client's shutdown() method.
Original pull request: #26
We now wait for the subscription to be present in the connection in case of async connections by periodically checking whether the subscription is available in 100ms intervals. The max time to wait for the async subscription can be configured and is set to 2 seconds by default.
Moved SpinBarrier and TestCondition from test packages as static inner classes into RedisMessageListenerContainer. Included ConnectionUtils from tests into official API.
Introduced Jackson2JsonRedisSerializer and added optional dependency for Jackson2 core/databind (fasterxml) library.
Added additional parameterised test cases. Needed to increase the max active connections limit for the connection pools used in RedisMapTests.
Update to Jedis 2.2.1 and Implement newly supported Operations.
Handle removed BinaryTransaction class.
Handle some Jedis return types changed from String to bytes.
Handle some Jedis arg types changed from int to long by removing casting.
Remove ignored tests for issues fixed in Jedis 2.2.1
Throw UnsupportedOpException on multi-arg bitOp NOT
Ensure consistent results across all drivers when bitOp is called with NOT and more than one arg.