Commit Graph

840 Commits

Author SHA1 Message Date
Mark Paluch
f19a61452a Polishing.
Update since tags. Move FlushOption converters to client-specific converters. Use method-references where possible.

See #2187
Original pull request: #2190.
2022-03-10 10:47:00 +01:00
Napster
3191def956 Add support for flush modes using FLUSHDB and FLUSHALL commands.
Closes #2187
Original pull request: #2190.
2022-03-10 10:46:58 +01:00
Mark Paluch
c63e2e2900 Polishing.
Add support for MINID trimming. Add tests. Extract Jedis XAddParams conversion to StreamConverters.

Reorder methods. Simplify StreamRecord creation.

See #2247
2022-03-09 10:29:28 +01:00
Mark Paluch
e97ee20da5 Polishing.
Make tests less strict for random values test.

See #2242
2022-02-23 15:35:12 +01:00
Mark Paluch
e31d122e54 Polishing.
Add since tags. Consistently document scan command with try-with-resources guidance. Use try-with-resources in tests.

See #2260
Original pull request: #2263.
2022-02-23 15:30:06 +01:00
Chen Li
04165fb747 Support scan in RedisTemplate.
Closes #2260
Original pull request: #2263.
2022-02-23 15:30:04 +01:00
Mark Paluch
d34c45bfe4 Polishing.
Allow Jedis to exist pub/sub loop gracefully. Await unsubscribe. Reduce retry backoff to allow from broken connection recovery. Do not use pooling to avoid using broken connections.

See #2256
2022-02-17 16:24:50 +01:00
Christoph Strobl
bc07540b9a Update copyright year to 2022.
See: #2264
2022-02-17 11:39:38 +01:00
Christoph Strobl
f6b21315a7 MessageListenerContainer must not be initialized twice.
Error when afterPropertiesSet is called more than once. Update documentation and error messages.
Original Pull Request: #2256
2022-02-17 11:38:25 +01:00
Mark Paluch
5681ddce68 Use proper subscribe methods and fix nullability assumptions.
See: #964
Original Pull Request: #2256
2022-02-17 11:38:18 +01:00
Mark Paluch
5959efb3af Revise implementation of RedisMessageListenerContainer.
RedisMessageListenerContainer is now reimplemented using non-blocking synchronization guards and a state management to simplify its maintenances. Additionally, listener registration and subscription setup through the start() method awaits until the listener subscription is confirmed by the Redis server. The synchronization removes potential race conditions that could happen by concurrent access to blocking Redis connectors in which the registration state was guessed and not awaited.

Resolves: #964
Original Pull Request: #2256
2022-02-17 11:37:57 +01:00
Mark Paluch
c426dac3bd Polishing.
Add author tags and update license years.

See #2222
2022-02-15 14:23:41 +01:00
Hendrik Duerkop
4b9738d61d Removed deprecated SpinBarrier.
Closes #2222
2022-02-15 13:51:34 +01:00
Mark Paluch
3571db7da2 Adopt tests to PagingAndSortingRepository split.
Closes #2258
2022-02-11 11:37:34 +01:00
Mark Paluch
6984e3663d Adopt to removed Spring Framework API. 2022-01-13 14:50:01 +01:00
Mark Paluch
10d8ca2a08 Migrate to Jakarta EE 9.
Closes #2172
2022-01-13 14:50:01 +01:00
John Blum
43de8bb309 Adapt to API changes in Spring Data Commons 3.0.
Closes #2173.
2022-01-13 14:50:00 +01:00
Christoph Strobl
93c25b0608 Switch Jackson default mapping default from NON_FINAL to EVERYTHING.
Closes #1566
Original pull request: #2237.
2022-01-13 14:48:50 +01:00
Mark Paluch
d0f17b167e Polishing.
Reformat code. Consider sentinel username in JedisConnectionFactory. Update years in license headers.

See #2218
Original pull request: #2224.
2022-01-07 11:05:19 +01:00
Vikas Garg
f333b184a5 Support sentinel username in SentinelConfiguration.
Closes #2218
Original pull request: #2224.
2022-01-07 11:05:04 +01:00
Mark Paluch
be1663c95e Adopt to Mockito changes.
Closes #2221
2022-01-04 15:02:06 +01:00
Mark Paluch
3ca2191445 Respect ByteBuffer position and limits in ByteUtils.getBytes(ByteBuffer).
We now properly extract the byte array from a ByteBuffer by copying its content respecting the read position and limits.

Closes #2204
Original Pull Request: #2213
2021-12-15 09:52:49 +01:00
Mark Paluch
9a56c38e2c Return single-element list with empty value when ReactiveHashOperations.hMGet(…) for a single key returns no value.
We now return a list containing a single empty KeyValue element when ReactiveHashOperations.hMGet(…) called for a single key returns no value.

Previously, the code used onErrorReturn(…) which returned the wrong value and suppressed errors.

Closes #2210
2021-12-10 10:03:02 +01:00
Mark Paluch
518fd6d946 Avoid cast to StatefulRedisConnection upon eager LettuceConnectionFactory initialization.
We now no longer try to cast the Lettuce connection to StatefulRedisConnection when eagerly initializing the shared connection. Instead, we now introduced another method to obtain the cluster connection.

Closes #2186
2021-11-12 08:52:28 +01:00
Mark Paluch
5852cc23f9 Add support for fluent findBy(…) query by example support.
Including projection and stream query support.

Closes #2150
Original pull request: #2151.
2021-10-08 13:58:30 +02:00
Mark Paluch
54feba95a9 Fix invalid Javadoc references.
See #2175
2021-09-27 10:02:15 +02:00
Mark Paluch
f5420d0477 Run top-level collection conversion tests only on Java 8.
Closes #2143
Related ticket: #2168
2021-09-16 09:47:33 +02:00
Mark Paluch
c392f030d8 Guard tests against changing subscription order.
See #2143
2021-09-16 08:46:26 +02:00
Mark Paluch
174680b9e7 Guard RedisClusterConfiguration.asMap and RedisSentinelConfiguration.asMap with Assert.noNullElements(…).
Closes #2167
2021-09-15 12:09:48 +02:00
Mark Paluch
a944aa2d1b Upgrade to Jedis 3.7.
Enable support for SCAN with type, call appropriate shutdown methods with save/nosave flags.

Closes: #2153
Original Pull Request: #2154
2021-09-03 11:23:00 +02:00
Mark Paluch
99053cfeac Polishing.
Fix build on Java 16.

See #2071
2021-09-02 11:55:23 +02:00
Mark Paluch
f205d574b5 Upgrade to XStream 1.4.18.
Closes #2152
2021-09-01 10:59:45 +02:00
Christoph Strobl
665569b9e7 Move geo shapes to domain specific package.
Original Pull Request: #2113
2021-07-14 11:28:03 +02:00
Mark Paluch
1bf31c0a17 Polishing.
Tweak messages to reflect the correct annotation name.

Original Pull Request: #2113
2021-07-14 11:27:49 +02:00
Mark Paluch
ce52baff98 Add support for GEOSEARCH/GEOSEARCHSTORE commands.
Supported through Lettuce only. GeoOperations support GEOSEARCH for now.

Closes: #2043
Original Pull Request: #2113
2021-07-14 11:27:23 +02:00
Mark John Moreno
f3f0c11f06 Add NOMKSTREAM option to XADD command.
Closes #2047
Original pull request: #2118.
2021-07-14 10:49:45 +02:00
Mark Paluch
3286d57691 Polishing.
Reorder methods. Remove unnecessary null guards. Introduce hashCode/equals methods to RedisConfiguration implementations. Refactor tests. Let LettuceClientConfiguration.builder apply settings from RedisURI. Introduce SentinelMasterId to implement equals method.

See #2116.
Original pull request: #2117.
2021-07-13 16:20:49 +02:00
bono007
19e9e7483b Add factory method to LettuceConnectionFactory to create RedisConfiguration from RedisURI.
Closes #2116.
Original pull request: #2117.
2021-07-13 16:19:52 +02:00
Mark Paluch
edde436f42 Avoid configuring the database number in JedisClientConfiguration used for Sentinels.
We now no longer configure the database number configured for data node access through JedisClientConfiguration instances that are used for Sentinel node connectivity. Previously, the configured database number lead to issuing a SELECT command on Sentinel that doesn't support database isolation.

Fixes: #2103.
Original Pull Request: #2112
2021-07-02 12:59:06 +02:00
Christoph Strobl
1b6737e9a5 Switch from plain String to DataType for ScanOptions.
Move the type method from KeyScanOptionsBuilder to the ScanOptionsBuilder to allow removal of the former.
Add a test for the reactive variant and allow SCAN tests with TYPE option to be executed starting with Redis 6.0.

Original Pull Request: #2109
2021-07-02 11:31:22 +02:00
Mark Paluch
674401c986 Add support for type using the SCAN command.
We now support the type argument for Keyspace scanning through KeyScanOptions.type.

Closes: #2089
Original Pull Request: #2109
2021-07-02 11:30:51 +02:00
Mark Paluch
085aca9f60 Consider exclusive Range for Jedis Stream range/pending commands.
We now consider Bound.exclusive(…) for XRANGE, XREVRANGE and XPENDING commands through Jedis.

Closes: #2044
Original Pull Request: #2108
2021-07-02 09:58:38 +02:00
Mark Paluch
eefbd0d821 Refine RedisList.
Add missing Javadoc. Add trim overload accepting long to avoid potential integer downcasting. Add factory methods to RedisList.

See: #2039
Original Pull Request: #2107
2021-07-01 18:05:44 +02:00
Mark Paluch
54ad66b62c Add support for LMOVE and BLMOVE.
Closes: #2039
Original Pull Request: #2107
2021-07-01 18:05:15 +02:00
Mark Paluch
b6820f0f61 Polishing.
Introduce factory methods on RedisSet for easier construction of RediSet. Add javadoc.
Revise clear method to perform a DEL command instead of empty set intersection.

See #2037
Original Pull Request: #2105
2021-06-30 16:28:26 +02:00
Mark Paluch
90095d1c89 Add support for SMISMEMBER.
Allows querying with a single command whether multiple elements are members of a set. Also, refine DefaultRedisSet.containsAll(…) implementation.

Closes #2037
Original Pull Request: #2105
2021-06-30 16:27:51 +02:00
Christoph Strobl
280d9541da Support ZRANDMEMBER via RedisZSet.
Add randomValue() method to both RedisZSet and RedisSet.

See: #2049
Original Pull Request: #2104
2021-06-30 15:17:04 +02:00
Christoph Strobl
4c4c96e9cf Support HRANDFIELD command via RedisMap.
Add randomKey() and randomEntry() to RedisHash.
Update documentation and align methods with java terminology around keys vs. fields in hashes.
Move Converters off their custom Map.Entry implementation and use SimpleImmutableEntry instead.
Switch code that creates Map.Entry to the newly introduced Converters.entryOf method.

See: #2048
Original Pull Request: #2104
2021-06-30 15:16:55 +02:00
Mark Paluch
a523b821c5 Add support for ZRANDMEMBER.
Closes: #2049
Original Pull Request: #2104
2021-06-30 15:09:27 +02:00
Mark Paluch
0b8fbae2c3 Add support for HRANDFIELD.
Closes: #2048
Original Pull Request: #2104
2021-06-30 15:08:47 +02:00