Extend copy(…) command with replace argument. Add support for reactive copy(…). Fix connection unit tests. Reorder methods.
Add since tags.
See #2040
Original pull request: #2059.
RedisCache.get(…) now optimistically fetches the cache value before entering cache-wide synchronization. The previous version synchronized all calls to `get(key, valueLoader)`.
Closes#2079
Original pull request: #2082.
We now await until a message has arrived in our pub/sub tests. Previously, we polled the message listener which could lead to false positives by delayed messages.
We also exclude raw (byte-array) cases as byte arrays cannot be easily checked for equality without further instrumentation.
Closes: #1834
Original Pull Request: #1978
We now support a configurable BatchStrategy for RedisCache. The implementations consist of KEYS (default) and SCAN. Since SCAN is not supported with Jedis Cluster and SCAN requires a batch size, we default to KEYS.
Closes: #1721
Original Pull Request: #2051
We now accept a byte array as pattern for scan operations in addition to String patterns.
Also, use binary Jedis scan method to avoid bytes to String conversion.
Closes: #2006
Original Pull Request: #2051
Obtaining a Connection from RedisConnectionFactory and its reactive variant is now guarded by IllegalStateException that is thrown if the connection factory was not yet initialized.
Previously, connections could be obtained where configuration was partially applied.
Closes#2057
Reorder methods. Move rewriteConfig directly implemented on connection to DefaultedRedisConnection respective DefaultedRedisClusterConnection.
Add overload to run config rewrite on individual cluster nodes. Add tests. Add since tags and update Javadoc.
See #1992
Original pull request: #2012.
Let Cursor extend CloseableCursor. Refine nullability annotations and align nullability behavior in tests with actual nullability usage.
See: #1575
Original Pull Request: #2014
MappingRedisConverter now accepts data for byte arrays as single property to avoid flattening out binary data into a collection form. We still accept data in a collection form to retain compatibility.
Closes: #1981
Original Pull Request: #2015
RedisConnectionProxy is now public so it can be used properly for Java proxy creation across different class loaders. Previously, creating a Java proxy from a different class loader failed because of visibility/access restrictions.
Closes#2016
Add support for Jedis Streams using JedisCluster. Add fromMany(…) for non-pipelined usage to JedisInvoker.
Reformat code, add author tags. Extract Jedis-specific stream type converters to StreamConverters. Properly convert StreamEntry and StreamEntryID into list/map. Update tests.
See #1711
Original pull request: #1977.
We now accept a type hint when calling getAllOf(…) to avoid materializing null instances when the actual type hint cannot resolve to an entity.
Closes#1995
Original Pull Request: #1996
RedisNode can now be constructed using an empty hostname. This can happen when a node is in failover state. RedisNode exposes hasValidHost() to check whether the node has a valid hostname.
Also, introduce copy constructor to avoid mutations caused by the builder.
Closes#1985
Original Pull Request: #1991
We now accept unknown custom Redis commands when using the Lettuce driver. Previously, custom commands were required to exist in Lettuce's CommandType enumeration and unknown commands (such as modules) failed to run.
Closes#1979
This commit makes sure to clean up resources when a previously expiring entity is persisted by setting the time to live to zero or negative.
In case a phantom copy exists for the changed entity, it is removed to free space on the server and prevent expiration events from being sent.
Closes#1955
Original Pull Request: #1961
We now support ZREMRANGEBYLEX for Synchronous, Reactive, ZSetOperations and RedisZSet.
Also provide a Kotlin coroutines variant via the extension for ReactiveZSetOperations.
Closes#1816.
Original pull request: #1968.
We now use JedisInvoker to call Jedis and Pipeline methods for synchronous, pipelining, and transactional execution models. JedisInvoker captures the method invocation as functional utility and allows conversion of results:
Long result = invoker.just(BinaryJedis::geoadd, MultiKeyPipelineBase:geoadd, key, point.getX(), point.getY(), member);
Closes#1951
Original Pull Request: #1960
We now use LettuceInvoker to call Lettuce API methods for synchronous, pipelining, and transactional execution models. LettuceInvoker captures the method invocation as functional utility and allows conversion of results:
Long result = invoker.just(RedisGeoAsyncCommands::geoadd, key, point.getX(), point.getY(), member);
List<byte[]> result = invoker.fromMany(RedisGeoAsyncCommands::geohash, key, members)
.toList(it -> it.getValueOrElse(null));
Closes#1797
Original Pull Request #1948
Reading and deserialization in StreamReceiver and StreamMessageListener is now decoupled from each other to allow fine-grained control over errors and resumption.
Previously, we used the Template API to read and deserialize stream records. Now the actual read happens before the deserialization so that errors during deserialization of individual messages can be handled properly. This split also allows advancing in the stream read. Previously, the failed deserialization prevented of getting hold of the non-serialized Stream record which caused the stream receiver to remain at the offset that fetched the offending record which effectively lead to an infinite loop.
We also support a resume function in StreamReceiver to control whether stream reads should be resumed or terminated.
Original Pull Request: #576