Commit Graph

1080 Commits

Author SHA1 Message Date
Mark Paluch
e9e2c53d78 Incorporate review feedback.
Reduce object instantiations.

Original Pull Request: #2467
2023-01-13 07:45:20 +01:00
Mark Paluch
230c764c69 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:44:46 +01:00
Mark Paluch
7b6a697265 Fix ReactiveRedisMessageListenerContainer disposal via ReactiveRedisTemplate.listenToLater(…).
We now properly dispose the container at the right time and not as result of the Mono<…> completion.

Closes: #2386
Original Pull Request: #2467
2023-01-13 07:43:37 +01:00
Mark Paluch
716640b7a8 Add output hints for HSTRLEN, XLEN, and XTRIM.
See #2473

Original pull request: #2482
2023-01-11 12:38:21 -08:00
Mark Paluch
ea37a7347a 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:37:58 -08:00
Mark Paluch
fb11f314fc Add assertions to fail early on absent values using StreamMessageListenerContainer.
Closes #2472
2023-01-02 11:10:10 +01:00
Mark Paluch
d9b6d4d395 Extend license header copyright years to 2023.
See #2476
2023-01-02 09:53:38 +01:00
Mark Paluch
cafa3c7a86 Align with KeyValue KeySpaceResolver changes.
We now use the KeyValue KeySpaceResolver to primarily detect the keyspace to be used instead of a fallback.

See #2457
See #2452
2022-12-07 11:14:36 +01:00
Mark Paluch
befafa8b0f Correctly consider KeySpaceResolver from KeyValueMappingContext.
Closes #2457
2022-12-07 11:08:44 +01:00
skyjiang
a968b19761 Remove duplicate map keys in Lettuce TypeHints.
Closes #2314
2022-11-11 10:35:09 +01:00
Mark Paluch
ca4e5cd5d2 Fix emptiness check in MappingRedisConverter.
Closes #2446
2022-11-11 10:33:31 +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
Christoph Strobl
e99463c4d9 Add missing RedisClient runtime hint.
Closes: #2440
2022-10-21 15:59:07 +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
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
bc983feac2 Refine HMGET and MGET documentation.
Closes #2309
2022-09-22 09:40:45 +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
ec1bcc5d0e Polishing.
Simplify code using arraycopy only for array copies. Call concatAll(…) from concat(…). Use i++ intead of ++i notation.

See #2366
2022-09-16 14:13:46 +02:00
Guy Korland
e13b61ffe2 Improve ByteUtils.concatAll(…) array allocations.
Closes #2366
2022-09-16 14:13:13 +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
1801ae8562 Refine documentation of HRANDFIELD and HRANDFIELD … WITHVALUES.
The documentation is now more precise about the return value.

Closes #2407
2022-09-15 14:23:56 +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
Mark Paluch
359d917a9e Adopt to changed Mockk artifact name.
Closes #2405
2022-09-12 11:25:51 +02:00
Christoph Strobl
fe940adeba Add missing hints for key bound operations
Closes: #2397
2022-09-09 10:53:48 +02:00
Christoph Strobl
55a27db3c4 Add serialization configuration for cache.support.NullValue
This commit makes sure to register serialization of null values for usage within a native image.

Closes: #2403
2022-09-09 10:21:10 +02:00
Mark Paluch
7d34afbcaa Call hstrlen on JedisCluster.
We now call hstrlen on the Cluster client instead of using our execute(…) fallback and determining the correct cluster node ourselves.

Closes #2392
2022-08-31 10:09:43 +02:00
Mark Paluch
cd1260ed5c Unsubscribe only once on Subscription.close().
We now unsubscribe from Redis only once when closing a Subscription object to avoid duplicate traffic and unexpected Redis responses.

Jedis does not have a mechanism to consume the additional unsubscribe response which leaves protocol frames on the InputStream leading to a corrupt state.

Closes #2355
2022-07-21 11:28:49 +02:00
Christoph Strobl
abf40297dd Fix HashMapper issue flattening java.math types.
We now make sure to include types from the java.math namespace.

Closes: #2365
2022-07-15 08:59:18 +02:00
Christoph Strobl
7f368c48ed Resolve target type of wrapped one in custom StdTypeResolverBuilder.
This commit makes sure to avoid typing of primitive wrapper types wrapped inside what is considered a jackson ReferenceType (such as Optional, AtomicReference,...).

Original Pull Request: #2364
2022-07-15 08:53:57 +02:00
Mark Paluch
b43c98a1a5 Introduce custom StdTypeResolverBuilder to support primitive arrays without type hints.
Closes: #2361
Original Pull Request: #2364
2022-07-15 08:53:50 +02:00
Mark Paluch
c600d0e22d Polishing.
We now ensure proper exception handling in connection close methods to avoid resource leaks. Also, exceptions during connection close are no longer thrown to ensure proper resource cleanup behavior and API design.

See #2356
2022-07-14 16:04:37 +02:00
Mark Paluch
ed816393f2 JedisConnection.close() no longer throws exceptions.
We now ensure proper exception handling in close methods to avoid resource leaks. Also, exceptions during connection close are no longer thrown to ensure proper resource cleanup behavior and API design.

Closes #2356
2022-07-14 16:04:20 +02:00
Mark Paluch
714f0e5c66 Polishing
Adopt new naming scheme, replace fqcn with imported ones.

See #2350
2022-07-13 15:14:21 +02:00
Mark Paluch
738d37ba29 Allow configuration of RedisMessageListenerContainer through @EnableRedisRepositories.
We now support configuration of a bean reference to RedisMessageListenerContainer that should be used with `RedisKeyValueAdapter` for easier configuration of the listener container.

Closes #1827
2022-07-13 09:39:07 +02:00
Christoph Strobl
38d2aa4bb8 Update native hints to cover proxies for key bound operations.
Also rename DataRedisRuntimeHints to RedisRuntimeHintsRegistrar.

See: #2350
2022-07-12 11:40:59 +02:00
Christoph Strobl
a55c73faeb Polishing.
Reduce constructor visibility and add tests with user provided ObjectMapper.

Original Pull Request: #2332
2022-07-12 07:45:33 +02:00
Mark Paluch
c013a63ba9 Refine Jackson2JsonRedisSerializer design.
Deprecate ObjectMapper setter. Introduce constructor accepting the ObjectMapper.

Original Pull Request: #2332
2022-07-12 07:45:33 +02:00
Christoph Strobl
6f4ac1125a Reader should provide target Object type to allow easy customization.
This commit makes sure to extract and pass on the target type, otherwise it would be Object.class all the time.

Original Pull Request: #2332
2022-07-12 07:43:05 +02:00
Mark Paluch
eb7dfbc7ef Introduce JacksonObjectReader and JacksonObjectWriter function interfaces to customize JSON (de)serialization.
We now encapsulate serialization and deserialization operations as JacksonObjectWriter and JacksonObjectReader functions to allow customization of Jackson serialization.

Closes: #2322
Original Pull Request: #2332
2022-07-12 07:42:29 +02:00