I edited for spelling, punctuation, grammar, clarity, and cross-references. I also pulled one piece of content that was being reused into its own file, so that I could include it rather than repeat it.
Original pull request: #331.
Move BitfieldCommand to top-level type BitFieldSubCommands.
Use primitives in command objects. Add toString methods. Add utility methods to extract responses from Jedis Client. Use Connection.execute(…) to invoke BITFIELD using Jedis. Fix Overflow values to string rendering.
Convert test ticket references to new format.
Original pull request: #227.
We now offer support for BITFIELD via RedisConnection and RedisClusterConnection using Lettuce and Jedis.
connection.bitField(key,
create()
.set(INT_8).valueAt(offset(0).multipliedByTypeLength()).to(100)
.incr(signed(8)).valueAt(offset(102)).overflow(FAIL).by(1));
Original pull request: #227.
Introduce dedicated methods utilizing the ReactiveMessageListenerContainer to create a stream of Messages via ReactiveRedisTemplate.
redisTemplate.listenToChannel("channel1", "channel2").doOnNext(msg -> {
// message processing ...
}).subscribe();
Add close-/destroyLater methods avoiding blocking shutdown of connections and containers.
Original Pull Request: #295
We now provide sending and receiving of Redis Pub/Sub messages with reactive connections. Messages can be sent with ReactiveRedisTemplate and received as infinite stream through ReactiveRedisMessageListenerContainer. ReactiveRedisMessageListenerContainer uses a single connection to multiplex different subscriptions.
Reactive Pub/Sub supports Standalone, Sentinel and Redis Cluster setups.
ReactiveRedisConnectionFactory factory = …;
ReactiveRedisTemplate<String, String> template = new ReactiveRedisTemplate<>(factory, RedisSerializationContext.string());
Mono<Long> publish = template.convertAndSend("hello!", "world");
ReactiveRedisMessageListenerContainer container = new ReactiveRedisMessageListenerContainer(factory);
Flux<ChannelMessage<String, String>> channelMessages = container.receive(new ChannelTopic("foo"));
Flux<PatternMessage<String, String, String>> patternMessages = container.receive(new PatternTopic("foo"));
//
container.destroy();
Original Pull Request: #295
We now provide factory methods to create default serializers/deserializers accepting ClassLoader.
RedisSerializer.java(ClassLoader)
RedisSerializationContext.java(ClassLoader)
RedisCacheConfiguration.defaultCacheConfig(ClassLoader)
Original Pull Request: #333
We now read and convert constructor property values through MappingRedisConverter.readProperty(…) to apply proper conversion. This way, constructor properties are read through the same methods as instance properties allowing to read back nested level entities.
Previously, we were only reading simple properties or properties associated with a registered Converter.
Original Pull Request: #329
Remove DefaultRedisMapEntry as it's no longer required. Simplify test to unit test to reduce test scope and test run time.
Original pull request: #326.
Redis has a limitation of 1024 * 1024 parameters]() for bulk operations.
To receive more than 1024 * 1024 - 1 entries with entrySet(), we can directly use the HGETALL command instead of first fetching the keys with HKEYS and then fetching the values with HMGET.
See also: https://github.com/antirez/redis/blob/4.0.9/src/networking.c#L1200
Original pull request: #326.
We now no longer set ifValueNotExists() in ReactiveHashCommands.hMSet to always upsert hash entries. Previously, we called HSETNX if hMSet was called with a single tuple which did not overwrite existing entries.
Align return value of hMSet to return always true as calling internally HSET returns 1 only on newly set hash fields and setting an existing field resulted previously in false.
Original Pull Request: #325
Introduce marker interface RedisConfiguration along with several others providing access to specific setup scenarios like cluster and sentinel.
Original Pull Request: #306
We now provide RedisElastiCacheConfiguration to configure connections to AWS ElastiCache for Redis services with optional read replicas.
RedisElastiCacheConfiguration elastiCache = new RedisElastiCacheConfiguration("redis-node-1.elasticache.aws.com")
.node("redis-node-2.elasticache.aws.com");
LettuceConnectionFactory factory = new LettuceConnectionFactory(elastiCache, configuration);
Original Pull Request: #306
We now share Lettuce Cluster connections if configured on LettuceConnectionFactory (enabled by default) across multiple LettuceClusterConnections. Connection sharing prevents creation and disposal of cluster connections per template command execution which improves overall performance.
Original Pull Request: #297