938 Commits

Author SHA1 Message Date
Mark Paluch
73acc6f95f Extend license header copyright years to 2024.
See #2818
2024-01-02 09:24:14 +01:00
Mark Paluch
bb1d129b40 Correctly apply Reactive zadd NX/XX command flags.
We now correctly apply if exists/if not exists constraints on the reactive zadd command.

Previously, we only considered upsert which wasn't sufficient to apply xx/nx.

Closes #2731
2023-10-12 10:03:58 +02:00
Mark Paluch
3997da8d47 Disable tests that we cannot fix currently.
See #2720
2023-09-28 14:58:54 +02:00
Mark Paluch
a1715dc0a9 Fix broken unit tests.
Closes #2720
2023-09-28 14:41:37 +02:00
Mark Paluch
060e3fdc76 Refine RedisSerializer implementations.
This commit polishes up method ordering, introduces Javadoc where missing and updates nullability annotations and argument names.

Closes #1097
2023-09-21 14:59:16 +02:00
John Blum
bbfe990f77 Polish for #2696.
Closes #2701
Original pull request: #2696
2023-09-06 17:14:28 -07:00
Mark Paluch
7fa03a1369 Polishing.
Replace qualified class name access of inner classes with simple names and imports.

Remove Java 8 guards. Extend supported temporal types in Jsr310Converters. Remove superfluous converter annotations.

Simplify tests.

See #2677
Original pull request: #2681
2023-08-17 09:13:57 +02:00
John Blum
eadd3f010c Register Converters for Offset java.time types in JSR310Converters.
We now appropriately handle OffsetDateTime and OffsetTime the same as all other java.time types, supported as simple types on Spring application (persistent) entity classes.

Closes #2677
2023-08-17 08:59:24 +02:00
Mark Paluch
3d6dacccdb Polishing.
Use Regex to capture the various styles of CLUSTER NODES endpoint representations.

See #2678
Original pull request: #2679
2023-08-16 11:56:26 +02:00
Sorokin Evgeniy
020ef9ce1b Add support for bracket-less IPv6 addresses to CLUSTER NODES Converter.
Closes #2678
Original pull request: #2679
2023-08-16 11:55:08 +02:00
John Blum
42f21841eb Polish for RedisSerializationContext.
Closes #2651
Original pull request: #2652
2023-07-27 16:49:31 -07:00
zhoukq
675c617e74 Assign 'tuple' to 'stringTuple' in DefaultRedisSerializationContextBuilder.string().
Currently, the builder method incorrectly assigns 'tuple' SerializationPair<String> argument to 'hashValueTuple'.

Closes #2651
Original pull request: #2652
2023-07-27 16:49:25 -07:00
John Blum
b26107d225 Polishing.
Additionally, applied Java 17 syntax, cleaned up compiler warnings, and edited Javadoc.

Closes #2644
Original pull request: #2640
2023-07-18 09:53:55 +02:00
Thach Le
7caa46cb4b Fix misordered 'final static' modifiers.
Per the Java Language Specification (Java 17; https://docs.oracle.com/javase/specs/jls/se17/html/jls-8.html#jls-8.3.1), 'static' should appear before 'final'.

This is also consistent with source code analysis tools, like Checkstyle, rules: https://checkstyle.sourceforge.io/apidocs/com/puppycrawl/tools/checkstyle/checks/modifier/ModifierOrderCheck.html.

Original pull request: #2640
2023-07-18 09:53:55 +02:00
Mark Paluch
1ad01d4dc1 Fix ZAddArgs.isEmpty.
isEmpty now returns true if empty. Previously, the boolean returns were flipped.

Closes #2588
2023-06-07 11:35:48 +02:00
John Blum
1dc49052b3 Edit and cleanup Javadoc.
Resolves #2586
2023-05-23 09:02:34 -07:00
John Blum
418121f087 Polish.
Additionally, refactors and cleans up the Redis cache extension and infrastructure.

Closes #2583
2023-05-18 17:32:11 -07:00
Yanming Zhou
8126924595 Improve RedisCacheManagerBuilder to expose applied RedisCacheConfiguration.
Now it is possible to construct a new, custom default RedisCacheConfiguration from an existing, default RedisCacheConfiguration.

This is useful in a Spring Boot context using the RedisCacheManagerBuilderCustomizer and acquiring access to the default RedisCacheConfiguration, which likely originated from Spring Boot Redis CacheProperties.

Resolves #2583
2023-05-18 17:32:06 -07:00
Mark Paluch
ad000b90e7 Polishing.
Widen test assertions to avoid double rounding errors failing the test.

See #2575
2023-05-11 11:20:01 +02:00
Mark Paluch
36c08ae9e9 Refactor Lettuce connection handling in integration tests.
Reuse condition objects in command and version condition extensions.

Shut down ClientResources via ShutdownQueue and ensure shared client resources usage.

Add close support to our MethodArgumentsProvider. Reuse LettuceTestClientConfiguration for test client config settings.

Closes #2575
2023-05-09 15:10:50 +02:00
John Blum
e973a50184 Fix element ordering issue on a mapped de/serialized entity having List property.
Closes #2565
2023-05-07 12:02:05 -07:00
Mark Paluch
c5e389f8be Fix BoundingBox.width return value.
We now return the correct value.

Closes #2526
2023-04-24 14:46:02 +02:00
Mark Paluch
0067cabe6c Adopt to Mockito 5.1 changes.
Closes #2504
2023-03-30 10:49:27 +02:00
John Blum
4c14bb770a Polish.
Closes #2466

See #2465
2023-03-02 19:19:22 -08:00
Marcin Zielinski
321e3f03f9 Add support for XCLAIM in StreamOperations
Closes #2465
2023-03-02 19:19:16 -08:00
Mark Paluch
5397ac1e56 Track subscriptions and unsubscriptions in LettuceReactiveRedisConnection.
We now track subscriptions and unsubscriptions in the reactive API to ensure that we do not prematurely unsubscribe from a channel or pattern if the topic was subscribed multiple times.

Original Pull Request: #2467
2023-01-13 07:46:02 +01:00
Mark Paluch
92a896fc93 Use correct output for ZCARD command using LettuceConnection.execute(…).
We now provide a type hint for the ZCARD command.

Closes #2473

Original pull request: #2482
2023-01-11 12:32:38 -08:00
Mark Paluch
45621dd3ee Extend license header copyright years to 2023.
See #2474
2023-01-02 09:50:15 +01:00
Christoph Strobl
e5a1011ab7 Add Nullable annotation to parameter of overridden equals method.
Closes: #2450
Original pull request: #2451
2022-11-11 10:23:44 +01:00
Mark Paluch
53c08d5565 Disable ZRANGESTORE with binary keys.
Seems something is off in Redis' that causes a Redis crash.

Closes #2441
2022-10-21 14:19:04 +02:00
Mark Paluch
ccdd5d2d98 Add observability adapter for Lettuce.
We now provide MicrometerTracingAdapter to connect Lettuce to Micrometer Tracing.

Original pull request: #2439
Closes #2348
2022-10-21 14:18:07 +02:00
Christoph Strobl
481057ba97 Disable tests based on system architecture.
Redis has issues with numeric representation of floating point numbers which causes tests to fail on M1.

See: redis/redis#3768
Closes: #2424
2022-10-07 08:20:06 +02:00
Mark Paluch
8f37abe950 Add support for Lettuce's 6.2 RedisCredentialsProvider.
We now support construction of RedisCredentialsProvider through LettuceClientConfiguration and RedisCredentialsProviderFactory.

The default implementation adapts credentials configured in RedisConfiguration objects.

Closes: #2376
Original Pull Request: #2387
2022-10-05 14:43:28 +02:00
Mark Paluch
c3ee0d8b3c Properly parse IPv6 host and port into RedisNode.
Closes #2418
2022-10-04 09:41:52 +02:00
Mark Paluch
4371d3f2e0 Improve failure-safety of Cursor.
Any failures during opening the cursor or scanning now close the cursor and release associated resources.

Closes #2414
2022-09-30 11:46:09 +02:00
断桥烟雨
eadaf9eb2b Fix typo in Javadoc.
Closes #2417
2022-09-30 11:34:12 +02:00
Mark Paluch
d94e9e87bd Refine methods accepting floating-point Range values.
For easier usage we now use Range<? extends Number> instead of Range<Number> to allow Range<Double> usage.

Original pull request: #2370.
Closes #2421
2022-09-30 11:25:40 +02:00
Mark Paluch
62932e2b47 Polishing.
Add reactive ZRANGESTORE support. Support rangeAndStore in RedisZSet.

Refine assertion messages. Refine overloads.

Original pull request: #2370.
See #2345
2022-09-30 11:25:32 +02:00
Shyngys Sapraliyev
40d078f66d Added zRangeStoreByLex and zRangeStoreByScore for ZRANGESTORE command.
Original pull request: #2370.
Closes #2345
2022-09-30 11:25:08 +02:00
Mark Paluch
a0bcf01a7f Polishing.
Unroll extension to avoid JvmOverload usage.

Closes #2227
2022-09-21 15:33:57 +02:00
Jens Deppe
d51ce05e59 Invoke correct BZPOPMAX method when called with a Duration.
`ZSetOperations.popMax(K key, Duration timeout)` now calls `popMax` instead the previously incorrect method `popMin`.

Closes #2323
2022-09-16 14:24:18 +02:00
Mark Paluch
6b1038c0ca Polishing.
Consistently use clear(…) as method name. Use configured cache key serializer instead of the conversion service.

See #2379
Original pull request: #2380.
2022-09-16 13:52:39 +02:00
josroseboom
f65ea0b1fb Add support to clear cache by key pattern.
Closes #2379
Original pull request: #2380.
2022-09-16 13:52:28 +02:00
Mark Paluch
7469ce009a Polishing.
Add author tags. Align Lettuce BZPOPMIN/MAX tests. Increase timeout to 10ms as Redis blocks indefinitely if the timeout is less than 0.01.

See #2324
2022-09-16 11:46:54 +02:00
Jens Deppe
c8f4d0c414 Fix potential NullPointerException when using Jedis Cluster BZPOP*.
For the Jedis-based implementations of bzpopmin and bzpopmax, a NPE is
  thrown if the provided timeout elapses and the server responds with a
  null array.

Closes #2324
2022-09-16 11:46:26 +02:00
Christoph Strobl
855fd9be5a Fix serialization issues with default typing in GenericJackson2JsonRedisSerializer.
Closes #2396
Original pull request: #2399.
2022-09-16 11:18:56 +02:00
Mark Paluch
8034cce7cb Move off deprecated API.
Closes #2409
2022-09-15 14:43:02 +02:00
Mark Paluch
3576bbfa8c Return null elements for absent keys using reactive MGET.
We now use correctly null to indicate absent keys when using reactive MGET. Previously, we used an empty byte buffer that could be incorrectly translated to an empty string when using the string codec. An empty byte buffer can also be returned if the value length is zero leading to a state that doesn't allow distinguishing between absence and empty value.

Closes #2402
2022-09-13 15:11:41 +02:00
Christoph Strobl
fe940adeba Add missing hints for key bound operations
Closes: #2397
2022-09-09 10:53:48 +02:00
Mark Paluch
86bd38a638 Polishing.
Remove invalid test.

See #2355
2022-07-21 11:45:14 +02:00