diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
new file mode 100644
index 0000000000..411d4a9338
--- /dev/null
+++ b/.github/workflows/codeql.yml
@@ -0,0 +1,21 @@
+# GitHub Actions for CodeQL Scanning
+
+name: "CodeQL Advanced"
+
+on:
+ push:
+ pull_request:
+ workflow_dispatch:
+ schedule:
+ # https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows#schedule
+ - cron: '0 5 * * *'
+
+permissions: read-all
+
+jobs:
+ codeql-analysis-call:
+ permissions:
+ actions: read
+ contents: read
+ security-events: write
+ uses: spring-io/github-actions/.github/workflows/codeql-analysis.yml@1
diff --git a/.github/workflows/project.yml b/.github/workflows/project.yml
index a5f764579a..4c8108d353 100644
--- a/.github/workflows/project.yml
+++ b/.github/workflows/project.yml
@@ -10,6 +10,11 @@ on:
pull_request_target:
types: [opened, edited, reopened]
+permissions:
+ contents: read
+ issues: write
+ pull-requests: write
+
jobs:
Inbox:
runs-on: ubuntu-latest
diff --git a/.gitignore b/.gitignore
index a0417bbada..62d57535ac 100644
--- a/.gitignore
+++ b/.gitignore
@@ -20,4 +20,5 @@ build/
node_modules
node
package-lock.json
+package.json
.mvn/.develocity
diff --git a/.mvn/extensions.xml b/.mvn/extensions.xml
index 1e3bb355f5..e0857eaa25 100644
--- a/.mvn/extensions.xml
+++ b/.mvn/extensions.xml
@@ -3,6 +3,6 @@
io.spring.develocity.conventionsdevelocity-conventions-maven-extension
- 0.0.19
+ 0.0.22
diff --git a/.mvn/jvm.config b/.mvn/jvm.config
new file mode 100644
index 0000000000..e27f6e8f5e
--- /dev/null
+++ b/.mvn/jvm.config
@@ -0,0 +1,14 @@
+--add-exports jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.model=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.processing=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED
+--add-exports jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED
+--add-opens jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED
+--add-opens jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED
+--add-opens=java.base/java.util=ALL-UNNAMED
+--add-opens=java.base/java.lang.reflect=ALL-UNNAMED
+--add-opens=java.base/java.text=ALL-UNNAMED
+--add-opens=java.desktop/java.awt.font=ALL-UNNAMED
diff --git a/.mvn/wrapper/maven-wrapper.properties b/.mvn/wrapper/maven-wrapper.properties
index f15f39b88f..5ddc066b11 100755
--- a/.mvn/wrapper/maven-wrapper.properties
+++ b/.mvn/wrapper/maven-wrapper.properties
@@ -1,2 +1,2 @@
-#Thu Nov 07 09:47:27 CET 2024
-distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.9/apache-maven-3.9.9-bin.zip
+#Thu Jul 17 14:04:44 CEST 2025
+distributionUrl=https\://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.11/apache-maven-3.9.11-bin.zip
diff --git a/Jenkinsfile b/Jenkinsfile
index 0344ab7349..f0611e913d 100644
--- a/Jenkinsfile
+++ b/Jenkinsfile
@@ -9,7 +9,7 @@ pipeline {
triggers {
pollSCM 'H/10 * * * *'
- upstream(upstreamProjects: "spring-data-keyvalue/main", threshold: hudson.model.Result.SUCCESS)
+ upstream(upstreamProjects: "spring-data-keyvalue/3.4.x", threshold: hudson.model.Result.SUCCESS)
}
options {
diff --git a/README.adoc b/README.adoc
index b62eb74359..d6e327b798 100644
--- a/README.adoc
+++ b/README.adoc
@@ -36,7 +36,7 @@ public class Example {
// inject the actual template
@Autowired
- private RedisTemplate template;
+ private RedisTemplate redisTemplate;
// inject the template as ListOperations
// can also inject as Value, Set, ZSet, and HashOperations
diff --git a/SECURITY.adoc b/SECURITY.adoc
index 884502dfde..654bfbea58 100644
--- a/SECURITY.adoc
+++ b/SECURITY.adoc
@@ -1,9 +1,15 @@
-# Security Policy
+= Security Policy
-## Supported Versions
+== Reporting a Vulnerability
-Please see the https://spring.io/projects/spring-data-redis[Spring Data Redis] project page for supported versions.
+Please, https://github.com/spring-projects/security-advisories/security/advisories/new[open a draft security advisory] if you need to disclose and discuss a security issue in private with the Spring Data team.
+Note that we only accept reports against https://spring.io/projects/spring-data#support[supported versions].
-## Reporting a Vulnerability
+For more details, check out our https://spring.io/security-policy[security policy].
-Please don't raise security vulnerabilities here. Head over to https://pivotal.io/security to learn how to disclose them responsibly.
+== JAR signing
+
+Spring Data JARs released on Maven Central are signed.
+You'll find more information about the key here: https://spring.io/GPG-KEY-spring.txt
+
+Versions released prior to 2023 may be signed with a different key.
diff --git a/ci/pipeline.properties b/ci/pipeline.properties
index cd2fcf7fbe..ae9e79e6e5 100644
--- a/ci/pipeline.properties
+++ b/ci/pipeline.properties
@@ -1,6 +1,6 @@
# Java versions
-java.main.tag=17.0.13_11-jdk-focal
-java.next.tag=23.0.1_11-jdk-noble
+java.main.tag=17.0.15_6-jdk-focal
+java.next.tag=24.0.1_9-jdk-noble
# Docker container images - standard
docker.java.main.image=library/eclipse-temurin:${java.main.tag}
@@ -21,8 +21,8 @@ docker.redis.7.version=7.2.4
docker.cassandra.3.version=3.11.16
# Docker environment settings
-docker.java.inside.basic=-v $HOME:/tmp/jenkins-home
-docker.java.inside.docker=-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home
+docker.java.inside.basic=-v $HOME:/tmp/jenkins-home --ulimit nofile=32000:32000
+docker.java.inside.docker=-u root -v /var/run/docker.sock:/var/run/docker.sock -v /usr/bin/docker:/usr/bin/docker -v $HOME:/tmp/jenkins-home --ulimit nofile=32000:32000
# Credentials
docker.registry=
diff --git a/package.json b/package.json
deleted file mode 100644
index 4689506b3f..0000000000
--- a/package.json
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "dependencies": {
- "antora": "3.2.0-alpha.6",
- "@antora/atlas-extension": "1.0.0-alpha.2",
- "@antora/collector-extension": "1.0.0-alpha.7",
- "@asciidoctor/tabs": "1.0.0-beta.6",
- "@springio/antora-extensions": "1.13.0",
- "@springio/asciidoctor-extensions": "1.0.0-alpha.11"
- }
-}
diff --git a/pom.xml b/pom.xml
index a7a8d7ab3f..329f5ae861 100644
--- a/pom.xml
+++ b/pom.xml
@@ -1,11 +1,11 @@
-
+
4.0.0org.springframework.dataspring-data-redis
- 3.4.0
+ 3.4.14-SNAPSHOTSpring Data RedisSpring Data module for Redis
@@ -14,17 +14,17 @@
org.springframework.data.buildspring-data-parent
- 3.4.0
+ 3.4.14-SNAPSHOT
- 3.4.0
- 3.4.0
+ 3.4.14-SNAPSHOT
+ 3.4.14-SNAPSHOT4.0.21.9.41.4.212.11.1
- 6.4.1.RELEASE
+ 6.4.2.RELEASE5.2.01.014.1.115.Final
@@ -389,7 +389,19 @@
-
-
+
+ spring-snapshot
+ https://repo.spring.io/snapshot
+
+ true
+
+
+ false
+
+
+
+ spring-milestone
+ https://repo.spring.io/milestone
+
diff --git a/src/main/antora/modules/ROOT/pages/observability.adoc b/src/main/antora/modules/ROOT/pages/observability.adoc
index e3a43ae122..f7b53ada60 100644
--- a/src/main/antora/modules/ROOT/pages/observability.adoc
+++ b/src/main/antora/modules/ROOT/pages/observability.adoc
@@ -16,7 +16,7 @@ class ObservabilityConfiguration {
public ClientResources clientResources(ObservationRegistry observationRegistry) {
return ClientResources.builder()
- .tracing(new MicrometerTracingAdapter(observationRegistry, "my-redis-cache"))
+ .tracing(new MicrometerTracing(observationRegistry, "my-redis-cache"))
.build();
}
@@ -31,15 +31,20 @@ class ObservabilityConfiguration {
}
----
+NOTE: When using Spring Boot, `LettuceMetricsAutoConfiguration` configures Lettuce's `MicrometerCommandLatencyRecorder`.
+Depending on whether you want only Metrics or Metrics and Tracing, you might want to exclude this auto-configuration class in your application.
+
+NOTE: Use Lettuce's built-in `MicrometerTracing` as `MicrometerTracingAdapter` has been deprecated for removal in future releases.
+
See also https://opentelemetry.io/docs/reference/specification/trace/semantic_conventions/database/#redis[OpenTelemetry Semantic Conventions] for further reference.
[[observability-metrics]]
== Observability - Metrics
-Below you can find a list of all metrics declared by this project.
+Below you can find a list of all metrics recorded by `MicrometerTracingAdapter`.
[[observability-metrics-redis-command-observation]]
-== Redis Command Observation
+=== Redis Command Observation
____
Timer created around a Redis command execution.
diff --git a/src/main/antora/modules/ROOT/pages/redis/cluster.adoc b/src/main/antora/modules/ROOT/pages/redis/cluster.adoc
index e32c781614..9e1e18f68c 100644
--- a/src/main/antora/modules/ROOT/pages/redis/cluster.adoc
+++ b/src/main/antora/modules/ROOT/pages/redis/cluster.adoc
@@ -37,8 +37,8 @@ The following example shows a set of commands being run across the cluster:
redis-cli@127.0.0.1:7379 > cluster nodes
6b38bb... 127.0.0.1:7379 master - 0 0 25 connected 0-5460 <1>
-7bb78c... 127.0.0.1:7380 master - 0 1449730618304 2 connected 5461-20242 <2>
-164888... 127.0.0.1:7381 master - 0 1449730618304 3 connected 10923-20243 <3>
+7bb78c... 127.0.0.1:7380 master - 0 1449730618304 2 connected 5461-20252 <2>
+164888... 127.0.0.1:7381 master - 0 1449730618304 3 connected 10923-20253 <3>
b8b5ee... 127.0.0.1:7382 slave 6b38bb... 0 1449730618304 25 connected <4>
----
diff --git a/src/main/antora/modules/ROOT/pages/redis/redis-cache.adoc b/src/main/antora/modules/ROOT/pages/redis/redis-cache.adoc
index 014aadb2e7..4e9f48df54 100644
--- a/src/main/antora/modules/ROOT/pages/redis/redis-cache.adoc
+++ b/src/main/antora/modules/ROOT/pages/redis/redis-cache.adoc
@@ -48,7 +48,7 @@ It is possible to opt in to the locking behavior as follows:
[source,java]
----
RedisCacheManager cacheManager = RedisCacheManager
- .build(RedisCacheWriter.lockingRedisCacheWriter(connectionFactory))
+ .builder(RedisCacheWriter.lockingRedisCacheWriter(connectionFactory))
.cacheDefaults(RedisCacheConfiguration.defaultCacheConfig())
...
----
@@ -77,7 +77,7 @@ The `SCAN` strategy requires a batch size to avoid excessive Redis command round
[source,java]
----
RedisCacheManager cacheManager = RedisCacheManager
- .build(RedisCacheWriter.nonLockingRedisCacheWriter(connectionFactory, BatchStrategies.scan(1000)))
+ .builder(RedisCacheWriter.nonLockingRedisCacheWriter(connectionFactory, BatchStrategies.scan(1000)))
.cacheDefaults(RedisCacheConfiguration.defaultCacheConfig())
...
----
diff --git a/src/main/antora/modules/ROOT/pages/redis/redis-repositories/expirations.adoc b/src/main/antora/modules/ROOT/pages/redis/redis-repositories/expirations.adoc
index ddb794213d..e037a70c45 100644
--- a/src/main/antora/modules/ROOT/pages/redis/redis-repositories/expirations.adoc
+++ b/src/main/antora/modules/ROOT/pages/redis/redis-repositories/expirations.adoc
@@ -35,7 +35,7 @@ public class TimeToLiveOnMethod {
----
====
-NOTE: Annotating a property explicitly with `@TimeToLive` reads back the actual `TTL` or `PTTL` value from Redis. -1 indicates that the object has no associated expiration.
+NOTE: Annotating a property explicitly with `@TimeToLive` reads back the actual `TTL` or `PTTL` value from Redis. `-1` indicates that the object has no associated expiration.
The repository implementation ensures subscription to https://redis.io/topics/notifications[Redis keyspace notifications] via javadoc:org.springframework.data.redis.listener.RedisMessageListenerContainer[].
@@ -60,8 +60,10 @@ Note that `CONFIG` is disabled on AWS ElastiCache, and enabling the listener lea
To work around this behavior, set the `keyspaceNotificationsConfigParameter` parameter to an empty string.
This prevents `CONFIG` command usage.
-NOTE: Redis Pub/Sub messages are not persistent.
+NOTE: Redis repositories rely on Pub/Sub messages for residual index cleanup.
+Redis Pub/Sub messages are not persistent.
If a key expires while the application is down, the expiry event is not processed, which may lead to secondary indexes containing references to the expired object.
+Redis does not allow for expiration of individual entries of a set that is used as secondary index.
NOTE: `@EnableKeyspaceEvents(shadowCopy = OFF)` disable storage of phantom copies and reduces data size within Redis. `RedisKeyExpiredEvent` will only contain the `id` of the expired key.
diff --git a/src/main/antora/modules/ROOT/pages/redis/redis-repositories/mapping.adoc b/src/main/antora/modules/ROOT/pages/redis/redis-repositories/mapping.adoc
index fb1a08c0f8..166786b1d0 100644
--- a/src/main/antora/modules/ROOT/pages/redis/redis-repositories/mapping.adoc
+++ b/src/main/antora/modules/ROOT/pages/redis/redis-repositories/mapping.adoc
@@ -183,7 +183,7 @@ NOTE: Custom conversions have no effect on index resolution. xref:redis/redis-re
== Customizing Type Mapping
If you want to avoid writing the entire Java class name as type information and would rather like to use a key, you can use the `@TypeAlias` annotation on the entity class being persisted.
-If you need to customize the mapping even more, look at the https://docs.spring.io/spring-data/commons/docs/current/api/org/springframework/data/convert/TypeInformationMapper.html[`TypeInformationMapper`] interface.
+If you need to customize the mapping even more, look at the {spring-data-commons-javadoc-base}/org/springframework/data/convert/TypeInformationMapper.html[`TypeInformationMapper`] interface.
An instance of that interface can be configured at the `DefaultRedisTypeMapper`, which can be configured on `MappingRedisConverter`.
The following example shows how to define a type alias for an entity:
diff --git a/src/main/antora/modules/ROOT/pages/redis/redis-repositories/usage.adoc b/src/main/antora/modules/ROOT/pages/redis/redis-repositories/usage.adoc
index ca6a9c41b1..e7f4fae343 100644
--- a/src/main/antora/modules/ROOT/pages/redis/redis-repositories/usage.adoc
+++ b/src/main/antora/modules/ROOT/pages/redis/redis-repositories/usage.adoc
@@ -87,7 +87,7 @@ public void basicCrudOperations() {
}
----
-<1> Generates a new `id` if the current value is `null` or reuses an already set `id` value and stores properties of type `Person` inside the Redis Hash with a key that has a pattern of `keyspace:id` -- in this case, it might be `people:5d67b7e1-8640-2024-beeb-c666fab4c0e5`.
+<1> Generates a new `id` if the current value is `null` or reuses an already set `id` value and stores properties of type `Person` inside the Redis Hash with a key that has a pattern of `keyspace:id` -- in this case, it might be `people:5d67b7e1-8640-2025-beeb-c666fab4c0e5`.
<2> Uses the provided `id` to retrieve the object stored at `keyspace:id`.
<3> Counts the total number of entities available within the keyspace, `people`, defined by `@RedisHash` on `Person`.
<4> Removes the key for the given object from Redis.
diff --git a/src/main/antora/modules/ROOT/pages/redis/template.adoc b/src/main/antora/modules/ROOT/pages/redis/template.adoc
index a43028834d..05af2e789b 100644
--- a/src/main/antora/modules/ROOT/pages/redis/template.adoc
+++ b/src/main/antora/modules/ROOT/pages/redis/template.adoc
@@ -159,7 +159,7 @@ class MyConfig {
}
@Bean
- ReactiveRedisTemplate ReactiveRedisTemplate(ReactoveRedisConnectionFactory connectionFactory) {
+ ReactiveRedisTemplate ReactiveRedisTemplate(ReactiveRedisConnectionFactory connectionFactory) {
return new ReactiveRedisTemplate<>(connectionFactory, RedisSerializationContext.string());
}
}
diff --git a/src/main/antora/resources/antora-resources/antora.yml b/src/main/antora/resources/antora-resources/antora.yml
index 10dd13d032..a42895b13e 100644
--- a/src/main/antora/resources/antora-resources/antora.yml
+++ b/src/main/antora/resources/antora-resources/antora.yml
@@ -3,21 +3,22 @@ prerelease: ${antora-component.prerelease}
asciidoc:
attributes:
- copyright-year: ${current.year}
- version: ${project.version}
- springversionshort: ${spring.short}
- springversion: ${spring}
attribute-missing: 'warn'
- commons: ${springdata.commons.docs}
- lettuce: ${lettuce}
- jedis: ${jedis}
+ chomp: 'all'
+ version: '${project.version}'
+ copyright-year: '${current.year}'
+ springversionshort: '${spring.short}'
+ springversion: '${spring}'
+ commons: '${springdata.commons.docs}'
+ lettuce: '${lettuce}'
+ jedis: '${jedis}'
include-xml-namespaces: false
- spring-data-commons-docs-url: https://docs.spring.io/spring-data/commons/reference
- spring-data-commons-javadoc-base: https://docs.spring.io/spring-data/commons/docs/${springdata.commons}/api/
- springdocsurl: https://docs.spring.io/spring-framework/reference/{springversionshort}
- springjavadocurl: https://docs.spring.io/spring-framework/docs/${spring}/javadoc-api
+ spring-data-commons-docs-url: '${documentation.baseurl}/spring-data/commons/reference/${springdata.commons.short}'
+ spring-data-commons-javadoc-base: '{spring-data-commons-docs-url}/api/java'
+ springdocsurl: '${documentation.baseurl}/spring-framework/reference/{springversionshort}'
spring-framework-docs: '{springdocsurl}'
+ springjavadocurl: '${documentation.spring-javadoc-url}'
spring-framework-javadoc: '{springjavadocurl}'
- springhateoasversion: ${spring-hateoas}
- releasetrainversion: ${releasetrain}
+ springhateoasversion: '${spring-hateoas}'
+ releasetrainversion: '${releasetrain}'
store: Redis
diff --git a/src/main/java/org/springframework/data/redis/ClusterRedirectException.java b/src/main/java/org/springframework/data/redis/ClusterRedirectException.java
index ee90d0f890..56774cdf00 100644
--- a/src/main/java/org/springframework/data/redis/ClusterRedirectException.java
+++ b/src/main/java/org/springframework/data/redis/ClusterRedirectException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -29,8 +29,7 @@
*/
public class ClusterRedirectException extends DataRetrievalFailureException {
- @Serial
- private static final long serialVersionUID = -857075813794333965L;
+ @Serial private static final long serialVersionUID = -857075813794333965L;
private final int slot;
private final String host;
diff --git a/src/main/java/org/springframework/data/redis/ClusterStateFailureException.java b/src/main/java/org/springframework/data/redis/ClusterStateFailureException.java
index d3867139c0..f46e9cde61 100644
--- a/src/main/java/org/springframework/data/redis/ClusterStateFailureException.java
+++ b/src/main/java/org/springframework/data/redis/ClusterStateFailureException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -30,8 +30,7 @@
*/
public class ClusterStateFailureException extends DataAccessResourceFailureException {
- @Serial
- private static final long serialVersionUID = 333399051713240852L;
+ @Serial private static final long serialVersionUID = 333399051713240852L;
/**
* Creates new {@link ClusterStateFailureException}.
diff --git a/src/main/java/org/springframework/data/redis/ExceptionTranslationStrategy.java b/src/main/java/org/springframework/data/redis/ExceptionTranslationStrategy.java
index d5c34e9cdb..a389a4c814 100644
--- a/src/main/java/org/springframework/data/redis/ExceptionTranslationStrategy.java
+++ b/src/main/java/org/springframework/data/redis/ExceptionTranslationStrategy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/FallbackExceptionTranslationStrategy.java b/src/main/java/org/springframework/data/redis/FallbackExceptionTranslationStrategy.java
index ed9728797f..58eb89e21b 100644
--- a/src/main/java/org/springframework/data/redis/FallbackExceptionTranslationStrategy.java
+++ b/src/main/java/org/springframework/data/redis/FallbackExceptionTranslationStrategy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/PassThroughExceptionTranslationStrategy.java b/src/main/java/org/springframework/data/redis/PassThroughExceptionTranslationStrategy.java
index aa4aeee609..55da37766b 100644
--- a/src/main/java/org/springframework/data/redis/PassThroughExceptionTranslationStrategy.java
+++ b/src/main/java/org/springframework/data/redis/PassThroughExceptionTranslationStrategy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/RedisConnectionFailureException.java b/src/main/java/org/springframework/data/redis/RedisConnectionFailureException.java
index 73d4fe2045..044a13126b 100644
--- a/src/main/java/org/springframework/data/redis/RedisConnectionFailureException.java
+++ b/src/main/java/org/springframework/data/redis/RedisConnectionFailureException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/RedisSystemException.java b/src/main/java/org/springframework/data/redis/RedisSystemException.java
index 0767a37698..64230b481f 100644
--- a/src/main/java/org/springframework/data/redis/RedisSystemException.java
+++ b/src/main/java/org/springframework/data/redis/RedisSystemException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/TooManyClusterRedirectionsException.java b/src/main/java/org/springframework/data/redis/TooManyClusterRedirectionsException.java
index db4b3026b4..410661bed4 100644
--- a/src/main/java/org/springframework/data/redis/TooManyClusterRedirectionsException.java
+++ b/src/main/java/org/springframework/data/redis/TooManyClusterRedirectionsException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,8 +27,7 @@
*/
public class TooManyClusterRedirectionsException extends DataRetrievalFailureException {
- @Serial
- private static final long serialVersionUID = -2818933672669154328L;
+ @Serial private static final long serialVersionUID = -2818933672669154328L;
/**
* Creates new {@link TooManyClusterRedirectionsException}.
diff --git a/src/main/java/org/springframework/data/redis/aot/RedisRuntimeHints.java b/src/main/java/org/springframework/data/redis/aot/RedisRuntimeHints.java
index 0649d513e6..efa2669e3c 100644
--- a/src/main/java/org/springframework/data/redis/aot/RedisRuntimeHints.java
+++ b/src/main/java/org/springframework/data/redis/aot/RedisRuntimeHints.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/BatchStrategies.java b/src/main/java/org/springframework/data/redis/cache/BatchStrategies.java
index 047ef3834c..41b1cfe3eb 100644
--- a/src/main/java/org/springframework/data/redis/cache/BatchStrategies.java
+++ b/src/main/java/org/springframework/data/redis/cache/BatchStrategies.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,16 +16,17 @@
package org.springframework.data.redis.cache;
import java.util.ArrayList;
-import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.NoSuchElementException;
-import java.util.Optional;
+import java.util.Set;
import org.springframework.data.redis.connection.RedisConnection;
+import org.springframework.data.redis.connection.RedisKeyCommands;
import org.springframework.data.redis.core.Cursor;
import org.springframework.data.redis.core.ScanOptions;
import org.springframework.util.Assert;
+import org.springframework.util.CollectionUtils;
/**
* Collection of predefined {@link BatchStrategy} implementations using the Redis {@code KEYS} or {@code SCAN} command.
@@ -33,6 +34,7 @@
* @author Mark Paluch
* @author Christoph Strobl
* @author John Blum
+ * @author Yong-Hyun Kim
* @since 2.6
*/
public abstract class BatchStrategies {
@@ -79,14 +81,17 @@ static class Keys implements BatchStrategy {
@Override
public long cleanCache(RedisConnection connection, String name, byte[] pattern) {
- byte[][] keys = Optional.ofNullable(connection.keys(pattern)).orElse(Collections.emptySet())
- .toArray(new byte[0][]);
+ RedisKeyCommands commands = connection.keyCommands();
- if (keys.length > 0) {
- connection.del(keys);
+ Set keys = commands.keys(pattern);
+
+ if (CollectionUtils.isEmpty(keys)) {
+ return 0;
}
- return keys.length;
+ commands.del(keys.toArray(new byte[0][]));
+
+ return keys.size();
}
}
diff --git a/src/main/java/org/springframework/data/redis/cache/BatchStrategy.java b/src/main/java/org/springframework/data/redis/cache/BatchStrategy.java
index d18db54c9a..98b3b32360 100644
--- a/src/main/java/org/springframework/data/redis/cache/BatchStrategy.java
+++ b/src/main/java/org/springframework/data/redis/cache/BatchStrategy.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/CacheKeyPrefix.java b/src/main/java/org/springframework/data/redis/cache/CacheKeyPrefix.java
index a08003f2d2..c9d25b9136 100644
--- a/src/main/java/org/springframework/data/redis/cache/CacheKeyPrefix.java
+++ b/src/main/java/org/springframework/data/redis/cache/CacheKeyPrefix.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,8 +18,8 @@
import org.springframework.util.Assert;
/**
- * {@link CacheKeyPrefix} is a callback hook for creating custom prefixes prepended to the actual {@literal key}
- * stored in Redis.
+ * {@link CacheKeyPrefix} is a callback hook for creating custom prefixes prepended to the actual {@literal key} stored
+ * in Redis.
*
* @author Christoph Strobl
* @author Mark Paluch
@@ -39,18 +39,15 @@ public interface CacheKeyPrefix {
/**
* Compute the {@link String prefix} for the actual {@literal cache key} stored in Redis.
*
- * @param cacheName {@link String name} of the cache in which the key is stored;
- * will never be {@literal null}.
- * @return the computed {@link String prefix} of the {@literal cache key} stored in Redis;
- * never {@literal null}.
+ * @param cacheName {@link String name} of the cache in which the key is stored; will never be {@literal null}.
+ * @return the computed {@link String prefix} of the {@literal cache key} stored in Redis; never {@literal null}.
*/
String compute(String cacheName);
/**
- * Creates a default {@link CacheKeyPrefix} scheme that prefixes cache keys with the {@link String name}
- * of the cache followed by double colons.
- *
- * For example, a cache named {@literal myCache} will prefix all cache keys with {@literal myCache::}.
+ * Creates a default {@link CacheKeyPrefix} scheme that prefixes cache keys with the {@link String name} of the cache
+ * followed by double colons. For example, a cache named {@literal myCache} will prefix all cache keys with
+ * {@literal myCache::}.
*
* @return the default {@link CacheKeyPrefix} scheme.
*/
@@ -59,12 +56,9 @@ static CacheKeyPrefix simple() {
}
/**
- * Creates a {@link CacheKeyPrefix} scheme that prefixes cache keys with the given {@link String prefix}.
- *
- * The {@link String prefix} is prepended to the {@link String cacheName} followed by double colons.
- *
- * For example, a prefix {@literal redis-} with a cache named {@literal myCache}
- * results in {@literal redis-myCache::}.
+ * Creates a {@link CacheKeyPrefix} scheme that prefixes cache keys with the given {@link String prefix}. The
+ * {@link String prefix} is prepended to the {@link String cacheName} followed by double colons. For example, a prefix
+ * {@literal redis-} with a cache named {@literal myCache} results in {@literal redis-myCache::}.
*
* @param prefix must not be {@literal null}.
* @return the default {@link CacheKeyPrefix} scheme.
diff --git a/src/main/java/org/springframework/data/redis/cache/CacheStatistics.java b/src/main/java/org/springframework/data/redis/cache/CacheStatistics.java
index d69d768508..7e92fa7835 100644
--- a/src/main/java/org/springframework/data/redis/cache/CacheStatistics.java
+++ b/src/main/java/org/springframework/data/redis/cache/CacheStatistics.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/CacheStatisticsCollector.java b/src/main/java/org/springframework/data/redis/cache/CacheStatisticsCollector.java
index 24b5eff794..d0ab23a6e3 100644
--- a/src/main/java/org/springframework/data/redis/cache/CacheStatisticsCollector.java
+++ b/src/main/java/org/springframework/data/redis/cache/CacheStatisticsCollector.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/CacheStatisticsProvider.java b/src/main/java/org/springframework/data/redis/cache/CacheStatisticsProvider.java
index b7566f4212..2a4eed63de 100644
--- a/src/main/java/org/springframework/data/redis/cache/CacheStatisticsProvider.java
+++ b/src/main/java/org/springframework/data/redis/cache/CacheStatisticsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/DefaultCacheStatisticsCollector.java b/src/main/java/org/springframework/data/redis/cache/DefaultCacheStatisticsCollector.java
index 6a8d5b7620..693a8e945b 100644
--- a/src/main/java/org/springframework/data/redis/cache/DefaultCacheStatisticsCollector.java
+++ b/src/main/java/org/springframework/data/redis/cache/DefaultCacheStatisticsCollector.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/DefaultRedisCacheWriter.java b/src/main/java/org/springframework/data/redis/cache/DefaultRedisCacheWriter.java
index d8e1b831e7..7d5b291404 100644
--- a/src/main/java/org/springframework/data/redis/cache/DefaultRedisCacheWriter.java
+++ b/src/main/java/org/springframework/data/redis/cache/DefaultRedisCacheWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/FixedDurationTtlFunction.java b/src/main/java/org/springframework/data/redis/cache/FixedDurationTtlFunction.java
index e0a328e878..6c456de4c8 100644
--- a/src/main/java/org/springframework/data/redis/cache/FixedDurationTtlFunction.java
+++ b/src/main/java/org/springframework/data/redis/cache/FixedDurationTtlFunction.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2023-2024 the original author or authors.
+ * Copyright 2023-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/MutableCacheStatistics.java b/src/main/java/org/springframework/data/redis/cache/MutableCacheStatistics.java
index a783da8c8f..94a19b1700 100644
--- a/src/main/java/org/springframework/data/redis/cache/MutableCacheStatistics.java
+++ b/src/main/java/org/springframework/data/redis/cache/MutableCacheStatistics.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/NoOpCacheStatisticsCollector.java b/src/main/java/org/springframework/data/redis/cache/NoOpCacheStatisticsCollector.java
index 498ff82679..4180ce875d 100644
--- a/src/main/java/org/springframework/data/redis/cache/NoOpCacheStatisticsCollector.java
+++ b/src/main/java/org/springframework/data/redis/cache/NoOpCacheStatisticsCollector.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/RedisCache.java b/src/main/java/org/springframework/data/redis/cache/RedisCache.java
index 41cd0330b2..8bf70e0853 100644
--- a/src/main/java/org/springframework/data/redis/cache/RedisCache.java
+++ b/src/main/java/org/springframework/data/redis/cache/RedisCache.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/cache/RedisCacheConfiguration.java b/src/main/java/org/springframework/data/redis/cache/RedisCacheConfiguration.java
index 0d32f86a0d..b2c5669f83 100644
--- a/src/main/java/org/springframework/data/redis/cache/RedisCacheConfiguration.java
+++ b/src/main/java/org/springframework/data/redis/cache/RedisCacheConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -35,9 +35,9 @@
* Immutable {@link RedisCacheConfiguration} used to customize {@link RedisCache} behavior, such as caching
* {@literal null} values, computing cache key prefixes and handling binary serialization.
*
- * Start with {@link RedisCacheConfiguration#defaultCacheConfig()} and customize {@link RedisCache} behavior
- * using the builder methods, such as {@link #entryTtl(Duration)}, {@link #serializeKeysWith(SerializationPair)}
- * and {@link #serializeValuesWith(SerializationPair)}.
+ * Start with {@link RedisCacheConfiguration#defaultCacheConfig()} and customize {@link RedisCache} behavior using the
+ * builder methods, such as {@link #entryTtl(Duration)}, {@link #serializeKeysWith(SerializationPair)} and
+ * {@link #serializeValuesWith(SerializationPair)}.
*
* @author Christoph Strobl
* @author Mark Paluch
@@ -110,14 +110,10 @@ public static RedisCacheConfiguration defaultCacheConfig(@Nullable ClassLoader c
registerDefaultConverters(conversionService);
- return new RedisCacheConfiguration(TtlFunction.persistent(),
- DEFAULT_CACHE_NULL_VALUES,
- DEFAULT_ENABLE_TIME_TO_IDLE_EXPIRATION,
- DEFAULT_USE_PREFIX,
- CacheKeyPrefix.simple(),
+ return new RedisCacheConfiguration(TtlFunction.persistent(), DEFAULT_CACHE_NULL_VALUES,
+ DEFAULT_ENABLE_TIME_TO_IDLE_EXPIRATION, DEFAULT_USE_PREFIX, CacheKeyPrefix.simple(),
SerializationPair.fromSerializer(RedisSerializer.string()),
- SerializationPair.fromSerializer(RedisSerializer.java(classLoader)),
- conversionService);
+ SerializationPair.fromSerializer(RedisSerializer.java(classLoader)), conversionService);
}
private final boolean cacheNullValues;
@@ -189,9 +185,8 @@ DEFAULT_USE_PREFIX, cacheKeyPrefix, getKeySerializationPair(), getValueSerializa
* @return new {@link RedisCacheConfiguration}.
*/
public RedisCacheConfiguration disableCachingNullValues() {
- return new RedisCacheConfiguration(getTtlFunction(), DO_NOT_CACHE_NULL_VALUES, isTimeToIdleEnabled(),
- usePrefix(), getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(),
- getConversionService());
+ return new RedisCacheConfiguration(getTtlFunction(), DO_NOT_CACHE_NULL_VALUES, isTimeToIdleEnabled(), usePrefix(),
+ getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(), getConversionService());
}
/**
@@ -203,21 +198,22 @@ public RedisCacheConfiguration disableCachingNullValues() {
*/
public RedisCacheConfiguration disableKeyPrefix() {
return new RedisCacheConfiguration(getTtlFunction(), getAllowCacheNullValues(), isTimeToIdleEnabled(),
- DO_NOT_USE_PREFIX, getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(), getConversionService());
+ DO_NOT_USE_PREFIX, getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(),
+ getConversionService());
}
/**
- * Enables {@literal time-to-idle (TTI) expiration} on {@link Cache} read operations,
- * such as {@link Cache#get(Object)}.
+ * Enables {@literal time-to-idle (TTI) expiration} on {@link Cache} read operations, such as
+ * {@link Cache#get(Object)}.
*
* Enabling this option applies the same {@link #getTtlFunction() TTL expiration policy} to {@link Cache} read
* operations as it does for {@link Cache} write operations. In effect, this will invoke the Redis {@literal GETEX}
* command in place of {@literal GET}.
*
- * Redis does not support the concept of {@literal TTI}, only {@literal TTL}. However, if {@literal TTL} expiration
- * is applied to all {@link Cache} operations, both read and write alike, and {@link Cache} operations passed with
- * expiration are used consistently across the application, then in effect, an application can achieve
- * {@literal TTI} expiration-like behavior.
+ * Redis does not support the concept of {@literal TTI}, only {@literal TTL}. However, if {@literal TTL} expiration is
+ * applied to all {@link Cache} operations, both read and write alike, and {@link Cache} operations passed with
+ * expiration are used consistently across the application, then in effect, an application can achieve {@literal TTI}
+ * expiration-like behavior.
*
* Requires Redis 6.2.0 or newer.
*
@@ -227,8 +223,7 @@ public RedisCacheConfiguration disableKeyPrefix() {
*/
public RedisCacheConfiguration enableTimeToIdle() {
return new RedisCacheConfiguration(getTtlFunction(), getAllowCacheNullValues(), USE_TIME_TO_IDLE_EXPIRATION,
- usePrefix(), getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(),
- getConversionService());
+ usePrefix(), getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(), getConversionService());
}
/**
@@ -256,9 +251,8 @@ public RedisCacheConfiguration entryTtl(TtlFunction ttlFunction) {
Assert.notNull(ttlFunction, "TtlFunction must not be null");
- return new RedisCacheConfiguration(ttlFunction, getAllowCacheNullValues(), isTimeToIdleEnabled(),
- usePrefix(), getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(),
- getConversionService());
+ return new RedisCacheConfiguration(ttlFunction, getAllowCacheNullValues(), isTimeToIdleEnabled(), usePrefix(),
+ getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(), getConversionService());
}
/**
@@ -271,8 +265,8 @@ public RedisCacheConfiguration serializeKeysWith(SerializationPair keySe
Assert.notNull(keySerializationPair, "KeySerializationPair must not be null");
- return new RedisCacheConfiguration(getTtlFunction(), getAllowCacheNullValues(), isTimeToIdleEnabled(),
- usePrefix(), getKeyPrefix(), keySerializationPair, getValueSerializationPair(), getConversionService());
+ return new RedisCacheConfiguration(getTtlFunction(), getAllowCacheNullValues(), isTimeToIdleEnabled(), usePrefix(),
+ getKeyPrefix(), keySerializationPair, getValueSerializationPair(), getConversionService());
}
/**
@@ -285,8 +279,8 @@ public RedisCacheConfiguration serializeValuesWith(SerializationPair> valueSer
Assert.notNull(valueSerializationPair, "ValueSerializationPair must not be null");
- return new RedisCacheConfiguration(getTtlFunction(), getAllowCacheNullValues(), isTimeToIdleEnabled(),
- usePrefix(), getKeyPrefix(), getKeySerializationPair(), valueSerializationPair, getConversionService());
+ return new RedisCacheConfiguration(getTtlFunction(), getAllowCacheNullValues(), isTimeToIdleEnabled(), usePrefix(),
+ getKeyPrefix(), getKeySerializationPair(), valueSerializationPair, getConversionService());
}
/**
@@ -299,8 +293,8 @@ public RedisCacheConfiguration withConversionService(ConversionService conversio
Assert.notNull(conversionService, "ConversionService must not be null");
- return new RedisCacheConfiguration(getTtlFunction(), getAllowCacheNullValues(), isTimeToIdleEnabled(),
- usePrefix(), getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(), conversionService);
+ return new RedisCacheConfiguration(getTtlFunction(), getAllowCacheNullValues(), isTimeToIdleEnabled(), usePrefix(),
+ getKeyPrefix(), getKeySerializationPair(), getValueSerializationPair(), conversionService);
}
/**
@@ -316,7 +310,7 @@ public boolean getAllowCacheNullValues() {
* Use {@link #enableTimeToIdle()} to opt-in and enable {@literal time-to-idle (TTI) expiration} for caching.
*
* @return {@literal true} if {@literal time-to-idle (TTI) expiration} was configured and enabled for caching.
- * Defaults to {@literal false}.
+ * Defaults to {@literal false}.
* @see GETEX
* @since 3.2.0
*/
@@ -400,8 +394,8 @@ public TtlFunction getTtlFunction() {
}
/**
- * Adds a {@link Converter} to extract the {@link String} representation of a {@literal cache key}
- * if no suitable {@link Object#toString()} method is present.
+ * Adds a {@link Converter} to extract the {@link String} representation of a {@literal cache key} if no suitable
+ * {@link Object#toString()} method is present.
*
* @param cacheKeyConverter {@link Converter} used to convert a {@literal cache key} into a {@link String}.
* @throws IllegalStateException if {@link #getConversionService()} does not allow {@link Converter} registration.
@@ -415,8 +409,8 @@ public void addCacheKeyConverter(Converter, String> cacheKeyConverter) {
/**
* Configure the underlying {@link ConversionService} used to extract the {@literal cache key}.
*
- * @param registryConsumer {@link Consumer} used to register a {@link Converter}
- * with the configured {@link ConverterRegistry}; never {@literal null}.
+ * @param registryConsumer {@link Consumer} used to register a {@link Converter} with the configured
+ * {@link ConverterRegistry}; never {@literal null}.
* @throws IllegalStateException if {@link #getConversionService()} does not allow {@link Converter} registration.
* @see org.springframework.core.convert.converter.ConverterRegistry
* @since 2.2
@@ -437,12 +431,12 @@ public void configureKeyConverters(Consumer registryConsumer)
*
* The following converters get registered:
*
- *
{@link String} to {@link byte byte[]} using UTF-8 encoding.
+ *
{@link String} to {@code byte byte[]} using UTF-8 encoding.
*
{@link SimpleKey} to {@link String}
*
*
- * @param registry {@link ConverterRegistry} in which the {@link Converter key converters} are registered;
- * must not be {@literal null}.
+ * @param registry {@link ConverterRegistry} in which the {@link Converter key converters} are registered; must not be
+ * {@literal null}.
* @see org.springframework.core.convert.converter.ConverterRegistry
*/
public static void registerDefaultConverters(ConverterRegistry registry) {
diff --git a/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java b/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java
index 23d51456c7..83dc0e9ec1 100644
--- a/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java
+++ b/src/main/java/org/springframework/data/redis/cache/RedisCacheManager.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -33,8 +33,8 @@
/**
* {@link CacheManager} implementation for Redis backed by {@link RedisCache}.
*
- * This {@link CacheManager} creates {@link Cache caches} on first write, by default. Empty {@link Cache caches}
- * are not visible in Redis due to how Redis represents empty data structures.
+ * This {@link CacheManager} creates {@link Cache caches} on first write, by default. Empty {@link Cache caches} are not
+ * visible in Redis due to how Redis represents empty data structures.
*
* {@link Cache Caches} requiring a different {@link RedisCacheConfiguration cache configuration} than the
* {@link RedisCacheConfiguration#defaultCacheConfig() default cache configuration} can be specified via
@@ -70,12 +70,12 @@ public class RedisCacheManager extends AbstractTransactionSupportingCacheManager
*
* Allows {@link RedisCache cache} creation at runtime.
*
- * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations
- * by executing appropriate Redis commands; must not be {@literal null}.
- * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches}
- * by default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
+ * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations by executing appropriate
+ * Redis commands; must not be {@literal null}.
+ * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches} by
+ * default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
* @throws IllegalArgumentException if either the given {@link RedisCacheWriter} or {@link RedisCacheConfiguration}
- * are {@literal null}.
+ * are {@literal null}.
* @see org.springframework.data.redis.cache.RedisCacheConfiguration
* @see org.springframework.data.redis.cache.RedisCacheWriter
*/
@@ -84,17 +84,17 @@ public RedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration d
}
/**
- * Creates a new {@link RedisCacheManager} initialized with the given {@link RedisCacheWriter}
- * and default {@link RedisCacheConfiguration} along with whether to allow cache creation at runtime.
+ * Creates a new {@link RedisCacheManager} initialized with the given {@link RedisCacheWriter} and default
+ * {@link RedisCacheConfiguration} along with whether to allow cache creation at runtime.
*
- * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations
- * by executing appropriate Redis commands; must not be {@literal null}.
- * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches}
- * by default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
+ * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations by executing appropriate
+ * Redis commands; must not be {@literal null}.
+ * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches} by
+ * default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
* @param allowRuntimeCacheCreation boolean specifying whether to allow creation of undeclared caches at runtime;
- * {@literal true} by default. Maybe just use {@link RedisCacheConfiguration#defaultCacheConfig()}.
+ * {@literal true} by default. Maybe just use {@link RedisCacheConfiguration#defaultCacheConfig()}.
* @throws IllegalArgumentException if either the given {@link RedisCacheWriter} or {@link RedisCacheConfiguration}
- * are {@literal null}.
+ * are {@literal null}.
* @see org.springframework.data.redis.cache.RedisCacheConfiguration
* @see org.springframework.data.redis.cache.RedisCacheWriter
* @since 2.0.4
@@ -113,19 +113,19 @@ private RedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration
/**
* Creates a new {@link RedisCacheManager} initialized with the given {@link RedisCacheWriter} and a default
- * {@link RedisCacheConfiguration} along with an optional, initial set of {@link String cache names}
- * used to create {@link RedisCache Redis caches} on startup.
+ * {@link RedisCacheConfiguration} along with an optional, initial set of {@link String cache names} used to create
+ * {@link RedisCache Redis caches} on startup.
*
* Allows {@link RedisCache cache} creation at runtime.
*
- * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations
- * by executing appropriate Redis commands; must not be {@literal null}.
- * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches}
- * by default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
+ * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations by executing appropriate
+ * Redis commands; must not be {@literal null}.
+ * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches} by
+ * default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
* @param initialCacheNames optional set of {@link String cache names} used to create {@link RedisCache Redis caches}
- * on startup. The default {@link RedisCacheConfiguration} will be applied to each cache.
+ * on startup. The default {@link RedisCacheConfiguration} will be applied to each cache.
* @throws IllegalArgumentException if either the given {@link RedisCacheWriter} or {@link RedisCacheConfiguration}
- * are {@literal null}.
+ * are {@literal null}.
* @see org.springframework.data.redis.cache.RedisCacheConfiguration
* @see org.springframework.data.redis.cache.RedisCacheWriter
*/
@@ -139,19 +139,19 @@ public RedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration d
* Creates a new {@link RedisCacheManager} initialized with the given {@link RedisCacheWriter} and default
* {@link RedisCacheConfiguration} along with whether to allow cache creation at runtime.
*
- * Additionally, the optional, initial set of {@link String cache names} will be used to
- * create {@link RedisCache Redis caches} on startup.
+ * Additionally, the optional, initial set of {@link String cache names} will be used to create {@link RedisCache
+ * Redis caches} on startup.
*
- * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations
- * by executing appropriate Redis commands; must not be {@literal null}.
- * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches}
- * by default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
+ * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations by executing appropriate
+ * Redis commands; must not be {@literal null}.
+ * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches} by
+ * default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
* @param allowRuntimeCacheCreation boolean specifying whether to allow creation of undeclared caches at runtime;
- * {@literal true} by default. Maybe just use {@link RedisCacheConfiguration#defaultCacheConfig()}.
+ * {@literal true} by default. Maybe just use {@link RedisCacheConfiguration#defaultCacheConfig()}.
* @param initialCacheNames optional set of {@link String cache names} used to create {@link RedisCache Redis caches}
- * on startup. The default {@link RedisCacheConfiguration} will be applied to each cache.
+ * on startup. The default {@link RedisCacheConfiguration} will be applied to each cache.
* @throws IllegalArgumentException if either the given {@link RedisCacheWriter} or {@link RedisCacheConfiguration}
- * are {@literal null}.
+ * are {@literal null}.
* @see org.springframework.data.redis.cache.RedisCacheConfiguration
* @see org.springframework.data.redis.cache.RedisCacheWriter
* @since 2.0.4
@@ -175,15 +175,15 @@ public RedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration d
*
* Allows {@link RedisCache cache} creation at runtime.
*
- * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations
- * by executing appropriate Redis commands; must not be {@literal null}.
- * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches}
- * by default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
+ * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations by executing appropriate
+ * Redis commands; must not be {@literal null}.
+ * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches} by
+ * default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
* @param initialCacheConfigurations {@link Map} of declared, known {@link String cache names} along with associated
- * {@link RedisCacheConfiguration} used to create and configure {@link RedisCache Reds caches} on startup;
- * must not be {@literal null}.
+ * {@link RedisCacheConfiguration} used to create and configure {@link RedisCache Reds caches} on startup;
+ * must not be {@literal null}.
* @throws IllegalArgumentException if either the given {@link RedisCacheWriter} or {@link RedisCacheConfiguration}
- * are {@literal null}.
+ * are {@literal null}.
* @see org.springframework.data.redis.cache.RedisCacheConfiguration
* @see org.springframework.data.redis.cache.RedisCacheWriter
*/
@@ -200,17 +200,17 @@ public RedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration d
* Additionally, an initial {@link RedisCache} will be created and configured using the associated
* {@link RedisCacheConfiguration} for each {@link String named} {@link RedisCache} in the given {@link Map}.
*
- * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations
- * by executing appropriate Redis commands; must not be {@literal null}.
- * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches}
- * by default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
+ * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations by executing appropriate
+ * Redis commands; must not be {@literal null}.
+ * @param defaultCacheConfiguration {@link RedisCacheConfiguration} applied to new {@link RedisCache Redis caches} by
+ * default when no cache-specific {@link RedisCacheConfiguration} is provided; must not be {@literal null}.
* @param allowRuntimeCacheCreation boolean specifying whether to allow creation of undeclared caches at runtime;
- * {@literal true} by default. Maybe just use {@link RedisCacheConfiguration#defaultCacheConfig()}.
+ * {@literal true} by default. Maybe just use {@link RedisCacheConfiguration#defaultCacheConfig()}.
* @param initialCacheConfigurations {@link Map} of declared, known {@link String cache names} along with the
- * associated {@link RedisCacheConfiguration} used to create and configure {@link RedisCache Redis caches}
- * on startup; must not be {@literal null}.
+ * associated {@link RedisCacheConfiguration} used to create and configure {@link RedisCache Redis caches} on
+ * startup; must not be {@literal null}.
* @throws IllegalArgumentException if either the given {@link RedisCacheWriter} or {@link RedisCacheConfiguration}
- * are {@literal null}.
+ * are {@literal null}.
* @see org.springframework.data.redis.cache.RedisCacheConfiguration
* @see org.springframework.data.redis.cache.RedisCacheWriter
* @since 2.0.4
@@ -226,7 +226,9 @@ public RedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration d
}
/**
- * @deprecated since 3.2. Use {@link RedisCacheManager#RedisCacheManager(RedisCacheWriter, RedisCacheConfiguration, boolean, Map)} instead.
+ * @deprecated since 3.2. Use
+ * {@link RedisCacheManager#RedisCacheManager(RedisCacheWriter, RedisCacheConfiguration, boolean, Map)}
+ * instead.
*/
@Deprecated(since = "3.2")
public RedisCacheManager(RedisCacheWriter cacheWriter, RedisCacheConfiguration defaultCacheConfiguration,
@@ -249,8 +251,8 @@ public static RedisCacheManagerBuilder builder() {
* Factory method returning a {@literal Builder} used to construct and configure a {@link RedisCacheManager}
* initialized with the given {@link RedisCacheWriter}.
*
- * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations
- * by executing appropriate Redis commands; must not be {@literal null}.
+ * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations by executing appropriate
+ * Redis commands; must not be {@literal null}.
* @return new {@link RedisCacheManagerBuilder}.
* @throws IllegalArgumentException if the given {@link RedisCacheWriter} is {@literal null}.
* @see org.springframework.data.redis.cache.RedisCacheWriter
@@ -266,8 +268,8 @@ public static RedisCacheManagerBuilder builder(RedisCacheWriter cacheWriter) {
* Factory method returning a {@literal Builder} used to construct and configure a {@link RedisCacheManager}
* initialized with the given {@link RedisConnectionFactory}.
*
- * @param connectionFactory {@link RedisConnectionFactory} used by the {@link RedisCacheManager}
- * to acquire connections to Redis when performing {@link RedisCache} operations; must not be {@literal null}.
+ * @param connectionFactory {@link RedisConnectionFactory} used by the {@link RedisCacheManager} to acquire
+ * connections to Redis when performing {@link RedisCache} operations; must not be {@literal null}.
* @return new {@link RedisCacheManagerBuilder}.
* @throws IllegalArgumentException if the given {@link RedisConnectionFactory} is {@literal null}.
* @see org.springframework.data.redis.connection.RedisConnectionFactory
@@ -297,8 +299,8 @@ public static RedisCacheManagerBuilder builder(RedisConnectionFactory connection
*
enabled
*
*
- * @param connectionFactory {@link RedisConnectionFactory} used by the {@link RedisCacheManager}
- * to acquire connections to Redis when performing {@link RedisCache} operations; must not be {@literal null}.
+ * @param connectionFactory {@link RedisConnectionFactory} used by the {@link RedisCacheManager} to acquire
+ * connections to Redis when performing {@link RedisCache} operations; must not be {@literal null}.
* @return new {@link RedisCacheManager}.
* @throws IllegalArgumentException if the given {@link RedisConnectionFactory} is {@literal null}.
* @see org.springframework.data.redis.connection.RedisConnectionFactory
@@ -326,8 +328,8 @@ public boolean isAllowRuntimeCacheCreation() {
* Return an {@link Collections#unmodifiableMap(Map) unmodifiable Map} containing {@link String caches name} mapped to
* the {@link RedisCache} {@link RedisCacheConfiguration configuration}.
*
- * @return unmodifiable {@link Map} containing {@link String cache name}
- * / {@link RedisCacheConfiguration configuration} pairs.
+ * @return unmodifiable {@link Map} containing {@link String cache name} / {@link RedisCacheConfiguration
+ * configuration} pairs.
*/
public Map getCacheConfigurations() {
@@ -353,8 +355,8 @@ protected RedisCacheConfiguration getDefaultCacheConfiguration() {
}
/**
- * Gets a {@link Map} of {@link String cache names} to {@link RedisCacheConfiguration} objects as the initial set
- * of {@link RedisCache Redis caches} to create on startup.
+ * Gets a {@link Map} of {@link String cache names} to {@link RedisCacheConfiguration} objects as the initial set of
+ * {@link RedisCache Redis caches} to create on startup.
*
* @return a {@link Map} of {@link String cache names} to {@link RedisCacheConfiguration} objects.
*/
@@ -363,8 +365,8 @@ protected Map getInitialCacheConfiguration() {
}
/**
- * Returns a reference to the configured {@link RedisCacheWriter} used to perform {@link RedisCache} operations,
- * such as reading from and writing to the cache.
+ * Returns a reference to the configured {@link RedisCacheWriter} used to perform {@link RedisCache} operations, such
+ * as reading from and writing to the cache.
*
* @return a reference to the configured {@link RedisCacheWriter}.
* @see org.springframework.data.redis.cache.RedisCacheWriter
@@ -382,8 +384,8 @@ protected RedisCache getMissingCache(String name) {
* Creates a new {@link RedisCache} with given {@link String name} and {@link RedisCacheConfiguration}.
*
* @param name {@link String name} for the {@link RedisCache}; must not be {@literal null}.
- * @param cacheConfiguration {@link RedisCacheConfiguration} used to configure the {@link RedisCache};
- * resolves to the {@link #getDefaultCacheConfiguration()} if {@literal null}.
+ * @param cacheConfiguration {@link RedisCacheConfiguration} used to configure the {@link RedisCache}; resolves to the
+ * {@link #getDefaultCacheConfiguration()} if {@literal null}.
* @return a new {@link RedisCache} instance; never {@literal null}.
*/
protected RedisCache createRedisCache(String name, @Nullable RedisCacheConfiguration cacheConfiguration) {
@@ -416,8 +418,8 @@ public static class RedisCacheManagerBuilder {
* Factory method returning a new {@literal Builder} used to create and configure a {@link RedisCacheManager} using
* the given {@link RedisCacheWriter}.
*
- * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations
- * by executing appropriate Redis commands; must not be {@literal null}.
+ * @param cacheWriter {@link RedisCacheWriter} used to perform {@link RedisCache} operations by executing
+ * appropriate Redis commands; must not be {@literal null}.
* @return new {@link RedisCacheManagerBuilder}.
* @throws IllegalArgumentException if the given {@link RedisCacheWriter} is {@literal null}.
* @see org.springframework.data.redis.cache.RedisCacheWriter
@@ -433,8 +435,8 @@ public static RedisCacheManagerBuilder fromCacheWriter(RedisCacheWriter cacheWri
* Factory method returning a new {@literal Builder} used to create and configure a {@link RedisCacheManager} using
* the given {@link RedisConnectionFactory}.
*
- * @param connectionFactory {@link RedisConnectionFactory} used by the {@link RedisCacheManager}
- * to acquire connections to Redis when performing {@link RedisCache} operations; must not be {@literal null}.
+ * @param connectionFactory {@link RedisConnectionFactory} used by the {@link RedisCacheManager} to acquire
+ * connections to Redis when performing {@link RedisCache} operations; must not be {@literal null}.
* @return new {@link RedisCacheManagerBuilder}.
* @throws IllegalArgumentException if the given {@link RedisConnectionFactory} is {@literal null}.
* @see org.springframework.data.redis.connection.RedisConnectionFactory
@@ -468,8 +470,8 @@ private RedisCacheManagerBuilder(RedisCacheWriter cacheWriter) {
/**
* Configure whether to allow cache creation at runtime.
*
- * @param allowRuntimeCacheCreation boolean to allow creation of undeclared caches at runtime;
- * {@literal true} by default.
+ * @param allowRuntimeCacheCreation boolean to allow creation of undeclared caches at runtime; {@literal true} by
+ * default.
* @return this {@link RedisCacheManagerBuilder}.
*/
public RedisCacheManagerBuilder allowCreateOnMissingCache(boolean allowRuntimeCacheCreation) {
@@ -480,9 +482,9 @@ public RedisCacheManagerBuilder allowCreateOnMissingCache(boolean allowRuntimeCa
/**
* Disable {@link RedisCache} creation at runtime for non-configured, undeclared caches.
*
- * {@link RedisCacheManager#getMissingCache(String)} returns {@literal null} for any non-configured,
- * undeclared {@link Cache} instead of a new {@link RedisCache} instance.
- * This allows the {@link org.springframework.cache.support.CompositeCacheManager} to participate.
+ * {@link RedisCacheManager#getMissingCache(String)} returns {@literal null} for any non-configured, undeclared
+ * {@link Cache} instead of a new {@link RedisCache} instance. This allows the
+ * {@link org.springframework.cache.support.CompositeCacheManager} to participate.
*
* @return this {@link RedisCacheManagerBuilder}.
* @see #allowCreateOnMissingCache(boolean)
@@ -583,8 +585,8 @@ public RedisCacheManagerBuilder transactionAware() {
}
/**
- * Registers the given {@link String cache name} and {@link RedisCacheConfiguration} used to create
- * and configure a {@link RedisCache} on startup.
+ * Registers the given {@link String cache name} and {@link RedisCacheConfiguration} used to create and configure a
+ * {@link RedisCache} on startup.
*
* @param cacheName {@link String name} of the cache to register for creation on startup.
* @param cacheConfiguration {@link RedisCacheConfiguration} used to configure the new cache on startup.
@@ -634,8 +636,8 @@ public Optional getCacheConfigurationFor(String cacheNa
/**
* Get the {@link Set} of cache names for which the builder holds {@link RedisCacheConfiguration configuration}.
*
- * @return an unmodifiable {@link Set} holding the name of caches
- * for which a {@link RedisCacheConfiguration configuration} has been set.
+ * @return an unmodifiable {@link Set} holding the name of caches for which a {@link RedisCacheConfiguration
+ * configuration} has been set.
* @since 2.2
*/
public Set getConfiguredCaches() {
diff --git a/src/main/java/org/springframework/data/redis/cache/RedisCacheWriter.java b/src/main/java/org/springframework/data/redis/cache/RedisCacheWriter.java
index 61e7f49d1d..e5e3d16b2b 100644
--- a/src/main/java/org/springframework/data/redis/cache/RedisCacheWriter.java
+++ b/src/main/java/org/springframework/data/redis/cache/RedisCacheWriter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -182,13 +182,13 @@ default boolean supportsAsyncRetrieve() {
/**
* Asynchronously retrieves the {@link CompletableFuture value} to which the {@link RedisCache} maps the given
- * {@link byte[] key}.
+ * {@code byte[] key}.
*
* This operation is non-blocking.
*
* @param name {@link String} with the name of the {@link RedisCache}.
- * @param key {@link byte[] key} mapped to the {@link CompletableFuture value} in the {@link RedisCache}.
- * @return the {@link CompletableFuture value} to which the {@link RedisCache} maps the given {@link byte[] key}.
+ * @param key {@code byte[] key} mapped to the {@link CompletableFuture value} in the {@link RedisCache}.
+ * @return the {@link CompletableFuture value} to which the {@link RedisCache} maps the given {@code byte[] key}.
* @see #retrieve(String, byte[], Duration)
* @since 3.2
*/
@@ -198,14 +198,14 @@ default CompletableFuture retrieve(String name, byte[] key) {
/**
* Asynchronously retrieves the {@link CompletableFuture value} to which the {@link RedisCache} maps the given
- * {@link byte[] key} setting the {@link Duration TTL expiration} for the cache entry.
+ * {@code byte[] key} setting the {@link Duration TTL expiration} for the cache entry.
*
* This operation is non-blocking.
*
* @param name {@link String} with the name of the {@link RedisCache}.
- * @param key {@link byte[] key} mapped to the {@link CompletableFuture value} in the {@link RedisCache}.
+ * @param key {@code byte[] key} mapped to the {@link CompletableFuture value} in the {@link RedisCache}.
* @param ttl {@link Duration} specifying the {@literal expiration timeout} for the cache entry.
- * @return the {@link CompletableFuture value} to which the {@link RedisCache} maps the given {@link byte[] key}.
+ * @return the {@link CompletableFuture value} to which the {@link RedisCache} maps the given {@code byte[] key}.
* @since 3.2
*/
CompletableFuture retrieve(String name, byte[] key, @Nullable Duration ttl);
diff --git a/src/main/java/org/springframework/data/redis/config/RedisCollectionParser.java b/src/main/java/org/springframework/data/redis/config/RedisCollectionParser.java
index 6e5963eb9f..bb50defa3e 100644
--- a/src/main/java/org/springframework/data/redis/config/RedisCollectionParser.java
+++ b/src/main/java/org/springframework/data/redis/config/RedisCollectionParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/config/RedisListenerContainerParser.java b/src/main/java/org/springframework/data/redis/config/RedisListenerContainerParser.java
index 7c09a8896d..c69d645e7b 100644
--- a/src/main/java/org/springframework/data/redis/config/RedisListenerContainerParser.java
+++ b/src/main/java/org/springframework/data/redis/config/RedisListenerContainerParser.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/config/RedisNamespaceHandler.java b/src/main/java/org/springframework/data/redis/config/RedisNamespaceHandler.java
index 256dba0ffd..5c4394020a 100644
--- a/src/main/java/org/springframework/data/redis/config/RedisNamespaceHandler.java
+++ b/src/main/java/org/springframework/data/redis/config/RedisNamespaceHandler.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/AbstractRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/AbstractRedisConnection.java
index 7b2581973d..46a7a12ded 100644
--- a/src/main/java/org/springframework/data/redis/connection/AbstractRedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/AbstractRedisConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/BitFieldSubCommands.java b/src/main/java/org/springframework/data/redis/connection/BitFieldSubCommands.java
index 282893d6b6..b90121f90b 100644
--- a/src/main/java/org/springframework/data/redis/connection/BitFieldSubCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/BitFieldSubCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutionFailureException.java b/src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutionFailureException.java
index 851a42cd1c..1ee5458ec3 100644
--- a/src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutionFailureException.java
+++ b/src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutionFailureException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutor.java b/src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutor.java
index 4bbf07bc83..2bd3e93f35 100644
--- a/src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutor.java
+++ b/src/main/java/org/springframework/data/redis/connection/ClusterCommandExecutor.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -254,8 +254,7 @@ MultiNodeResult collectResults(Map>>
} catch (ExecutionException ex) {
entryIterator.remove();
exceptionCollector.addException(nodeExecution, ex.getCause());
- } catch (TimeoutException ignore) {
- } catch (InterruptedException ex) {
+ } catch (TimeoutException ignore) {} catch (InterruptedException ex) {
Thread.currentThread().interrupt();
exceptionCollector.addException(nodeExecution, ex);
break OUT;
@@ -471,9 +470,9 @@ public RedisClusterNode getNode() {
}
/**
- * Return the {@link byte[] key} mapped to the value stored in Redis.
+ * Return the {@code byte[] key} mapped to the value stored in Redis.
*
- * @return a {@link byte[] byte array} of the key mapped to the value stored in Redis.
+ * @return a {@code byte[] byte array} of the key mapped to the value stored in Redis.
*/
public byte[] getKey() {
return this.key.getArray();
diff --git a/src/main/java/org/springframework/data/redis/connection/ClusterInfo.java b/src/main/java/org/springframework/data/redis/connection/ClusterInfo.java
index e09ebbfd8d..8d6179811c 100644
--- a/src/main/java/org/springframework/data/redis/connection/ClusterInfo.java
+++ b/src/main/java/org/springframework/data/redis/connection/ClusterInfo.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ClusterNodeResourceProvider.java b/src/main/java/org/springframework/data/redis/connection/ClusterNodeResourceProvider.java
index 454ac41d23..a12ce3f8ea 100644
--- a/src/main/java/org/springframework/data/redis/connection/ClusterNodeResourceProvider.java
+++ b/src/main/java/org/springframework/data/redis/connection/ClusterNodeResourceProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ClusterSlotHashUtil.java b/src/main/java/org/springframework/data/redis/connection/ClusterSlotHashUtil.java
index 6494f423c7..aedf32e72c 100644
--- a/src/main/java/org/springframework/data/redis/connection/ClusterSlotHashUtil.java
+++ b/src/main/java/org/springframework/data/redis/connection/ClusterSlotHashUtil.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -101,8 +101,8 @@ public static boolean isSameSlotForAllKeys(ByteBuffer... keys) {
/**
* Determines whether all keys will hash to the same slot.
*
- * @param keys {@link Collection} of {@link ByteBuffer} objects containing the keys to evaluate;
- * must not be {@literal null}.
+ * @param keys {@link Collection} of {@link ByteBuffer} objects containing the keys to evaluate; must not be
+ * {@literal null}.
* @return a boolean value indicating whether all keys will hash to the same slot.
* @throws IllegalArgumentException if the {@link Collection} of keys is {@literal null}.
* @since 2.0
@@ -115,10 +115,8 @@ public static boolean isSameSlotForAllKeys(Collection keys) {
return true;
}
- return isSameSlotForAllKeys(keys.stream()
- .map(ByteBuffer::duplicate)
- .map(ByteUtils::getBytes)
- .toArray(byte[][]::new));
+ return isSameSlotForAllKeys(
+ keys.stream().map(ByteBuffer::duplicate).map(ByteUtils::getBytes).toArray(byte[][]::new));
}
/**
diff --git a/src/main/java/org/springframework/data/redis/connection/ClusterTopology.java b/src/main/java/org/springframework/data/redis/connection/ClusterTopology.java
index 1ea254bdb2..42436431f4 100644
--- a/src/main/java/org/springframework/data/redis/connection/ClusterTopology.java
+++ b/src/main/java/org/springframework/data/redis/connection/ClusterTopology.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ClusterTopologyProvider.java b/src/main/java/org/springframework/data/redis/connection/ClusterTopologyProvider.java
index 22827c1d2b..f03067e21f 100644
--- a/src/main/java/org/springframework/data/redis/connection/ClusterTopologyProvider.java
+++ b/src/main/java/org/springframework/data/redis/connection/ClusterTopologyProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ConnectionUtils.java b/src/main/java/org/springframework/data/redis/connection/ConnectionUtils.java
index 9c768307f4..58af2c6ba1 100644
--- a/src/main/java/org/springframework/data/redis/connection/ConnectionUtils.java
+++ b/src/main/java/org/springframework/data/redis/connection/ConnectionUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/DataType.java b/src/main/java/org/springframework/data/redis/connection/DataType.java
index 746eb09a9b..1b0635fbeb 100644
--- a/src/main/java/org/springframework/data/redis/connection/DataType.java
+++ b/src/main/java/org/springframework/data/redis/connection/DataType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/DecoratedRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/DecoratedRedisConnection.java
index 2757810c0e..19ad271389 100644
--- a/src/main/java/org/springframework/data/redis/connection/DecoratedRedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/DecoratedRedisConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultMessage.java b/src/main/java/org/springframework/data/redis/connection/DefaultMessage.java
index 0ec00955e9..b96a0895f3 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultMessage.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultMessage.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultSortParameters.java b/src/main/java/org/springframework/data/redis/connection/DefaultSortParameters.java
index 44526bd999..bd50f34ba6 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultSortParameters.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultSortParameters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java
index 80cc128e55..685f026701 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultStringRedisConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,6 +23,7 @@
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
+
import org.springframework.core.convert.converter.Converter;
import org.springframework.data.geo.Circle;
import org.springframework.data.geo.Distance;
@@ -34,10 +35,19 @@
import org.springframework.data.redis.connection.convert.ListConverter;
import org.springframework.data.redis.connection.convert.MapConverter;
import org.springframework.data.redis.connection.convert.SetConverter;
-import org.springframework.data.redis.connection.stream.*;
+import org.springframework.data.redis.connection.stream.ByteRecord;
+import org.springframework.data.redis.connection.stream.Consumer;
+import org.springframework.data.redis.connection.stream.MapRecord;
+import org.springframework.data.redis.connection.stream.PendingMessages;
+import org.springframework.data.redis.connection.stream.PendingMessagesSummary;
+import org.springframework.data.redis.connection.stream.ReadOffset;
+import org.springframework.data.redis.connection.stream.RecordId;
import org.springframework.data.redis.connection.stream.StreamInfo.XInfoConsumers;
import org.springframework.data.redis.connection.stream.StreamInfo.XInfoGroups;
import org.springframework.data.redis.connection.stream.StreamInfo.XInfoStream;
+import org.springframework.data.redis.connection.stream.StreamOffset;
+import org.springframework.data.redis.connection.stream.StreamReadOptions;
+import org.springframework.data.redis.connection.stream.StringRecord;
import org.springframework.data.redis.connection.zset.Aggregate;
import org.springframework.data.redis.connection.zset.DefaultTuple;
import org.springframework.data.redis.connection.zset.Tuple;
@@ -1389,8 +1399,7 @@ private org.springframework.data.domain.Range.Bound rawBound(
@SuppressWarnings("unchecked")
private GeoReference serialize(GeoReference data) {
return data instanceof GeoReference.GeoMemberReference
- ? GeoReference
- .fromMember(serializer.serialize(((GeoMemberReference) data).getMember()))
+ ? GeoReference.fromMember(serializer.serialize(((GeoMemberReference) data).getMember()))
: (GeoReference) data;
}
@@ -2710,16 +2719,14 @@ public Set zRevRangeByLex(String key, org.springframework.data.domain.Ra
}
@Override
- public Long zRangeStoreByLex(byte[] dstKey, byte[] srcKey,
- org.springframework.data.domain.Range range,
- org.springframework.data.redis.connection.Limit limit) {
- return convertAndReturn(delegate.zRangeStoreByLex(dstKey, srcKey, range, limit),
- Converters.identityConverter());
+ public Long zRangeStoreByLex(byte[] dstKey, byte[] srcKey, org.springframework.data.domain.Range range,
+ org.springframework.data.redis.connection.Limit limit) {
+ return convertAndReturn(delegate.zRangeStoreByLex(dstKey, srcKey, range, limit), Converters.identityConverter());
}
@Override
- public Long zRangeStoreByLex(String dstKey, String srcKey,
- org.springframework.data.domain.Range range, org.springframework.data.redis.connection.Limit limit) {
+ public Long zRangeStoreByLex(String dstKey, String srcKey, org.springframework.data.domain.Range range,
+ org.springframework.data.redis.connection.Limit limit) {
return convertAndReturn(delegate.zRangeStoreByLex(serialize(dstKey), serialize(srcKey), serialize(range), limit),
Converters.identityConverter());
}
@@ -2740,9 +2747,8 @@ public Long zRangeStoreRevByLex(String dstKey, String srcKey, org.springframewor
@Override
public Long zRangeStoreByScore(byte[] dstKey, byte[] srcKey,
org.springframework.data.domain.Range extends Number> range,
- org.springframework.data.redis.connection.Limit limit) {
- return convertAndReturn(delegate.zRangeStoreByScore(dstKey, srcKey, range, limit),
- Converters.identityConverter());
+ org.springframework.data.redis.connection.Limit limit) {
+ return convertAndReturn(delegate.zRangeStoreByScore(dstKey, srcKey, range, limit), Converters.identityConverter());
}
@Override
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultStringTuple.java b/src/main/java/org/springframework/data/redis/connection/DefaultStringTuple.java
index 7851a0f2a8..b35522c642 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultStringTuple.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultStringTuple.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultedRedisClusterConnection.java b/src/main/java/org/springframework/data/redis/connection/DefaultedRedisClusterConnection.java
index dfa5986df5..369a272476 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultedRedisClusterConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultedRedisClusterConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/DefaultedRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/DefaultedRedisConnection.java
index aaeaafe18b..e9ad2d2b8a 100644
--- a/src/main/java/org/springframework/data/redis/connection/DefaultedRedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/DefaultedRedisConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1841,9 +1841,8 @@ default T evalSha(byte[] scriptSha, ReturnType returnType, int numKeys, byte
/** @deprecated in favor of {@link RedisConnection#zSetCommands()}}. */
@Override
@Deprecated
- default Long zRangeStoreByLex(byte[] dstKey, byte[] srcKey,
- org.springframework.data.domain.Range range,
- org.springframework.data.redis.connection.Limit limit) {
+ default Long zRangeStoreByLex(byte[] dstKey, byte[] srcKey, org.springframework.data.domain.Range range,
+ org.springframework.data.redis.connection.Limit limit) {
return zSetCommands().zRangeStoreByLex(dstKey, srcKey, range, limit);
}
@@ -1860,7 +1859,7 @@ default Long zRangeStoreRevByLex(byte[] dstKey, byte[] srcKey, org.springframewo
@Deprecated
default Long zRangeStoreByScore(byte[] dstKey, byte[] srcKey,
org.springframework.data.domain.Range extends Number> range,
- org.springframework.data.redis.connection.Limit limit) {
+ org.springframework.data.redis.connection.Limit limit) {
return zSetCommands().zRangeStoreByScore(dstKey, srcKey, range, limit);
}
diff --git a/src/main/java/org/springframework/data/redis/connection/FutureResult.java b/src/main/java/org/springframework/data/redis/connection/FutureResult.java
index 122e889798..58da880234 100644
--- a/src/main/java/org/springframework/data/redis/connection/FutureResult.java
+++ b/src/main/java/org/springframework/data/redis/connection/FutureResult.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/Limit.java b/src/main/java/org/springframework/data/redis/connection/Limit.java
index f47e2b6747..d6abf62b85 100644
--- a/src/main/java/org/springframework/data/redis/connection/Limit.java
+++ b/src/main/java/org/springframework/data/redis/connection/Limit.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/Message.java b/src/main/java/org/springframework/data/redis/connection/Message.java
index 5be91f3897..138f61f3b2 100644
--- a/src/main/java/org/springframework/data/redis/connection/Message.java
+++ b/src/main/java/org/springframework/data/redis/connection/Message.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/MessageListener.java b/src/main/java/org/springframework/data/redis/connection/MessageListener.java
index fcf894a413..4857b45c6d 100644
--- a/src/main/java/org/springframework/data/redis/connection/MessageListener.java
+++ b/src/main/java/org/springframework/data/redis/connection/MessageListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/NamedNode.java b/src/main/java/org/springframework/data/redis/connection/NamedNode.java
index a638ed5781..5ccf100762 100644
--- a/src/main/java/org/springframework/data/redis/connection/NamedNode.java
+++ b/src/main/java/org/springframework/data/redis/connection/NamedNode.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/PoolException.java b/src/main/java/org/springframework/data/redis/connection/PoolException.java
index 06969e9ace..1dc6b89cbb 100644
--- a/src/main/java/org/springframework/data/redis/connection/PoolException.java
+++ b/src/main/java/org/springframework/data/redis/connection/PoolException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterCommands.java
index da4fad9d76..d780acced3 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2020-2024 the original author or authors.
+ * Copyright 2020-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterGeoCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterGeoCommands.java
index d4496375cd..ae97652ba0 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterGeoCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterGeoCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHashCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHashCommands.java
index 60e2390988..6674520b33 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHashCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHashCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHyperLogLogCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHyperLogLogCommands.java
index 03df631960..2623eeda84 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHyperLogLogCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterHyperLogLogCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterKeyCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterKeyCommands.java
index 21aea13ba1..23dd8e65e3 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterKeyCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterKeyCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,11 +15,11 @@
*/
package org.springframework.data.redis.connection;
+import reactor.core.publisher.Mono;
+
import java.nio.ByteBuffer;
import java.util.List;
-import reactor.core.publisher.Mono;
-
/**
* @author Christoph Strobl
* @since 2.0
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterListCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterListCommands.java
index ad5bf5a3dc..f331728178 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterListCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterListCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterNumberCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterNumberCommands.java
index 5968745c1c..3840a33b32 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterNumberCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterNumberCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterScriptingCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterScriptingCommands.java
index b027421546..a7e0f171c7 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterScriptingCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterScriptingCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterServerCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterServerCommands.java
index 050715b734..2a19d5fcfe 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterServerCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterServerCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterSetCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterSetCommands.java
index 8590edeab9..b20809fd24 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterSetCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterSetCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStreamCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStreamCommands.java
index 696958fd77..42b29a7b91 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStreamCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStreamCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -19,5 +19,4 @@
* @author Mark Paluch
* @since 2.2
*/
-public interface ReactiveClusterStreamCommands extends ReactiveStreamCommands {
-}
+public interface ReactiveClusterStreamCommands extends ReactiveStreamCommands {}
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStringCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStringCommands.java
index 3800aec877..a410627a3a 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStringCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterStringCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterZSetCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterZSetCommands.java
index f11a90d7cb..167d0f59b1 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveClusterZSetCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveClusterZSetCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveGeoCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveGeoCommands.java
index cbeec12b28..c6172a677b 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveGeoCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveGeoCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -826,7 +826,7 @@ public Optional getLimit() {
}
/**
- * @return can be {@literal null}.
+ * @return can be {@literal null}.
*/
@Nullable
public Point getPoint() {
@@ -1159,7 +1159,7 @@ public Optional getLimit() {
}
/**
- * @return can be {@literal null}.
+ * @return can be {@literal null}.
*/
@Nullable
public ByteBuffer getMember() {
@@ -1229,7 +1229,7 @@ default Flux>> geoRadiusByMember(ByteBuffer ke
return geoRadiusByMember(
Mono.just(GeoRadiusByMemberCommand.within(distance).from(member).forKey(key).withArgs(geoRadiusArgs)))
- .flatMap(CommandResponse::getOutput);
+ .flatMap(CommandResponse::getOutput);
}
/**
@@ -1484,7 +1484,7 @@ default Mono geoSearchStore(ByteBuffer destKey, ByteBuffer key, GeoReferen
GeoShape shape, GeoSearchStoreCommandArgs args) {
return geoSearchStore(
Mono.just(GeoSearchStoreCommand.within(shape).in(key).storeAt(destKey).at(reference).with(args))).next()
- .map(CommandResponse::getOutput);
+ .map(CommandResponse::getOutput);
}
/**
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java
index d75c2242a0..0fae8d30b8 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveHashCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveHyperLogLogCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveHyperLogLogCommands.java
index d10975851a..cba1cc8fac 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveHyperLogLogCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveHyperLogLogCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveKeyCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveKeyCommands.java
index bd3f4d73dd..1055aa52a9 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveKeyCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveKeyCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -231,9 +231,10 @@ default Mono touch(Collection keys) {
Flux, Long>> touch(Publisher> keys);
/**
- * Find all keys matching the given {@literal pattern}.
- * It is recommended to use {@link #scan(ScanOptions)} to iterate over the keyspace as {@link #keys(ByteBuffer)} is a
- * non-interruptible and expensive Redis operation.
+ * Retrieve all keys matching the given pattern via {@code KEYS} command.
+ *
+ * IMPORTANT: This command is non-interruptible and scans the entire keyspace which may cause
+ * performance issues. Consider {@link #scan(ScanOptions)} for large datasets.
*
* @param pattern must not be {@literal null}.
* @return
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveListCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveListCommands.java
index f3fbd20f3e..d92a99a270 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveListCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveListCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveNumberCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveNumberCommands.java
index bbade90af8..31f80cc460 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveNumberCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveNumberCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactivePubSubCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactivePubSubCommands.java
index d07155b4ab..5ea9d74885 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactivePubSubCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactivePubSubCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveRedisClusterConnection.java b/src/main/java/org/springframework/data/redis/connection/ReactiveRedisClusterConnection.java
index 2dc4efd081..cec6b7991b 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveRedisClusterConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveRedisClusterConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/ReactiveRedisConnection.java
index 7da6929ad3..5dfb6d9db8 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveRedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveRedisConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveRedisConnectionFactory.java b/src/main/java/org/springframework/data/redis/connection/ReactiveRedisConnectionFactory.java
index 05e726e753..3492913549 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveRedisConnectionFactory.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveRedisConnectionFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveScriptingCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveScriptingCommands.java
index 5337763728..4ad5d59004 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveScriptingCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveScriptingCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveServerCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveServerCommands.java
index d95b718503..c0d65c1a81 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveServerCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveServerCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveSetCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveSetCommands.java
index 845301dba9..76911fd441 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveSetCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveSetCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveStreamCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveStreamCommands.java
index db05734500..e091b6f7df 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveStreamCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveStreamCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,12 +27,13 @@
import java.util.Map;
import org.reactivestreams.Publisher;
+
import org.springframework.data.domain.Range;
import org.springframework.data.redis.connection.ReactiveRedisConnection.CommandResponse;
import org.springframework.data.redis.connection.ReactiveRedisConnection.KeyCommand;
import org.springframework.data.redis.connection.ReactiveRedisConnection.NumericResponse;
-import org.springframework.data.redis.connection.RedisStreamCommands.XClaimOptions;
import org.springframework.data.redis.connection.RedisStreamCommands.XAddOptions;
+import org.springframework.data.redis.connection.RedisStreamCommands.XClaimOptions;
import org.springframework.data.redis.connection.RedisStreamCommands.XPendingOptions;
import org.springframework.data.redis.connection.stream.ByteBufferRecord;
import org.springframework.data.redis.connection.stream.Consumer;
@@ -411,8 +412,7 @@ default Mono xAdd(ByteBufferRecord record, XAddOptions xAddOptions) {
Assert.notNull(xAddOptions, "XAddOptions must not be null");
AddStreamRecord addStreamRecord = AddStreamRecord.of(record)
- .approximateTrimming(xAddOptions.isApproximateTrimming())
- .makeNoStream(xAddOptions.isNoMkStream());
+ .approximateTrimming(xAddOptions.isApproximateTrimming()).makeNoStream(xAddOptions.isNoMkStream());
if (xAddOptions.hasMaxlen()) {
addStreamRecord = addStreamRecord.maxlen(xAddOptions.getMaxlen());
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveStringCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveStringCommands.java
index f6d18dbcfb..ab324fb46e 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveStringCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveStringCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveSubscription.java b/src/main/java/org/springframework/data/redis/connection/ReactiveSubscription.java
index 2929544c97..c5e74e60de 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveSubscription.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveSubscription.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,13 +15,13 @@
*/
package org.springframework.data.redis.connection;
-import org.springframework.lang.Nullable;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
import java.nio.ByteBuffer;
import java.util.Set;
+import org.springframework.lang.Nullable;
import org.springframework.util.Assert;
import org.springframework.util.ObjectUtils;
diff --git a/src/main/java/org/springframework/data/redis/connection/ReactiveZSetCommands.java b/src/main/java/org/springframework/data/redis/connection/ReactiveZSetCommands.java
index 2abbb212ce..f9761d1896 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReactiveZSetCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReactiveZSetCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -1439,7 +1439,7 @@ default Flux zRevRangeByScoreWithScores(ByteBuffer key, Range ran
return zRangeByScore(
Mono.just(ZRangeByScoreCommand.reverseScoresWithin(range).withScores().from(key).limitTo(limit)))
- .flatMap(CommandResponse::getOutput);
+ .flatMap(CommandResponse::getOutput);
}
/**
@@ -1974,7 +1974,7 @@ default Mono zCard(ByteBuffer key) {
}
/**
- * Get the size of sorted set with {@linByteBuffer keyCommand#getKey()}.
+ * Get the size of sorted set with {@link ByteBuffer keyCommand#getKey()}.
*
* @param commands must not be {@literal null}.
* @return
@@ -2824,7 +2824,7 @@ default Flux zInterWithScores(List sets, List weights
return zInterWithScores(
Mono.just(ZAggregateCommand.sets(sets).aggregateUsing(aggregateFunction).applyWeights(weights)))
- .flatMap(CommandResponse::getOutput);
+ .flatMap(CommandResponse::getOutput);
}
/**
@@ -2843,7 +2843,7 @@ default Flux zInterWithScores(List sets, Weights weights, @Nu
return zInterWithScores(
Mono.just(ZAggregateCommand.sets(sets).aggregateUsing(aggregateFunction).applyWeights(weights)))
- .flatMap(CommandResponse::getOutput);
+ .flatMap(CommandResponse::getOutput);
}
/**
@@ -2993,7 +2993,7 @@ default Mono zInterStore(ByteBuffer destinationKey, List sets,
return zInterStore(Mono.just(
ZInterStoreCommand.sets(sets).aggregateUsing(aggregateFunction).applyWeights(weights).storeAs(destinationKey)))
- .next().map(NumericResponse::getOutput);
+ .next().map(NumericResponse::getOutput);
}
/**
@@ -3016,7 +3016,7 @@ default Mono zInterStore(ByteBuffer destinationKey, List sets,
return zInterStore(Mono.just(
ZInterStoreCommand.sets(sets).aggregateUsing(aggregateFunction).applyWeights(weights).storeAs(destinationKey)))
- .next().map(NumericResponse::getOutput);
+ .next().map(NumericResponse::getOutput);
}
/**
@@ -3099,7 +3099,7 @@ default Flux zUnionWithScores(List sets, List weights
return zUnionWithScores(
Mono.just(ZAggregateCommand.sets(sets).aggregateUsing(aggregateFunction).applyWeights(weights)))
- .flatMap(CommandResponse::getOutput);
+ .flatMap(CommandResponse::getOutput);
}
/**
@@ -3118,7 +3118,7 @@ default Flux zUnionWithScores(List sets, Weights weights, @Nu
return zUnionWithScores(
Mono.just(ZAggregateCommand.sets(sets).aggregateUsing(aggregateFunction).applyWeights(weights)))
- .flatMap(CommandResponse::getOutput);
+ .flatMap(CommandResponse::getOutput);
}
/**
@@ -3300,7 +3300,7 @@ default Mono zUnionStore(ByteBuffer destinationKey, List sets,
return zUnionStore(Mono.just(
ZUnionStoreCommand.sets(sets).aggregateUsing(aggregateFunction).applyWeights(weights).storeAs(destinationKey)))
- .next().map(NumericResponse::getOutput);
+ .next().map(NumericResponse::getOutput);
}
/**
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisClusterCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisClusterCommands.java
index 9a47dd7413..018a78b6cb 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisClusterCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisClusterCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisClusterCommandsProvider.java b/src/main/java/org/springframework/data/redis/connection/RedisClusterCommandsProvider.java
index 7427559004..e26842e779 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisClusterCommandsProvider.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisClusterCommandsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisClusterConfiguration.java b/src/main/java/org/springframework/data/redis/connection/RedisClusterConfiguration.java
index 62d9b6d140..8960d32ae1 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisClusterConfiguration.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisClusterConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisClusterConnection.java b/src/main/java/org/springframework/data/redis/connection/RedisClusterConnection.java
index d079fae2f3..585780ecb1 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisClusterConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisClusterConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisClusterNode.java b/src/main/java/org/springframework/data/redis/connection/RedisClusterNode.java
index 99cd937075..506d0c3cae 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisClusterNode.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisClusterNode.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -216,8 +216,8 @@ public SlotRange(BitSet range) {
}
/**
- * Determines whether this {@link SlotRange} contains the given {@link Integer slot}, which implies
- * this cluster nodes manages the slot holding data stored in Redis.
+ * Determines whether this {@link SlotRange} contains the given {@link Integer slot}, which implies this cluster
+ * nodes manages the slot holding data stored in Redis.
*
* @param slot {@link Integer slot} to evaluate.
* @return true when slot is part of the range.
@@ -286,14 +286,8 @@ public enum LinkState {
*/
public enum Flag {
- MYSELF("myself"),
- MASTER("master"),
- REPLICA("slave"),
- FAIL("fail"),
- PFAIL("fail?"),
- HANDSHAKE("handshake"),
- NOADDR("noaddr"),
- NOFLAGS("noflags");
+ MYSELF("myself"), MASTER("master"), REPLICA("slave"), FAIL("fail"), PFAIL("fail?"), HANDSHAKE("handshake"), NOADDR(
+ "noaddr"), NOFLAGS("noflags");
private String raw;
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisClusterServerCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisClusterServerCommands.java
index 0802c5a7ac..1bcac4c1f7 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisClusterServerCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisClusterServerCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisCommands.java
index 2b60126aad..b6c0515304 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -31,8 +31,8 @@ public interface RedisCommands extends RedisKeyCommands, RedisStringCommands, Re
/**
* {@literal Native} or {@literal raw} execution of the given Redis command along with the given arguments.
*
- * The command is executed as is, with as little interpretation as possible - it is up to the caller to take care
- * of any processing of arguments or the result.
+ * The command is executed as is, with as little interpretation as possible - it is up to the caller to take care of
+ * any processing of arguments or the result.
*
* @param command Redis {@link String command} to execute; must not be {@literal null}.
* @param args optional array of command arguments; may be empty;
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisCommandsProvider.java b/src/main/java/org/springframework/data/redis/connection/RedisCommandsProvider.java
index 0a1c7a18ed..24cfc387f9 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisCommandsProvider.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisCommandsProvider.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2022-2024 the original author or authors.
+ * Copyright 2022-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisConfiguration.java b/src/main/java/org/springframework/data/redis/connection/RedisConfiguration.java
index 395ccfc85f..053ce917de 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisConfiguration.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisConnection.java b/src/main/java/org/springframework/data/redis/connection/RedisConnection.java
index b3021e64ef..69917d5391 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisConnectionCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisConnectionCommands.java
index 704da97a77..74875a4bb2 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisConnectionCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisConnectionCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisConnectionFactory.java b/src/main/java/org/springframework/data/redis/connection/RedisConnectionFactory.java
index 88f74d8a56..d694630701 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisConnectionFactory.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisConnectionFactory.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisGeoCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisGeoCommands.java
index 815363f36c..fce11eb2f6 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisGeoCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisGeoCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2016-2024 the original author or authors.
+ * Copyright 2016-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java
index d1587a7918..6385c56a57 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisHashCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisHyperLogLogCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisHyperLogLogCommands.java
index de24aff2d7..67fa08a4ad 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisHyperLogLogCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisHyperLogLogCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisInvalidSubscriptionException.java b/src/main/java/org/springframework/data/redis/connection/RedisInvalidSubscriptionException.java
index 0af5905aec..d638a90de7 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisInvalidSubscriptionException.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisInvalidSubscriptionException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisKeyCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisKeyCommands.java
index ceaf0025be..24821c83e8 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisKeyCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisKeyCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -120,7 +120,10 @@ default Boolean exists(byte[] key) {
Long touch(byte[]... keys);
/**
- * Find all keys matching the given {@code pattern}.
+ * Retrieve all keys matching the given pattern.
+ *
+ * IMPORTANT: The {@literal KEYS} command is non-interruptible and scans the entire keyspace which
+ * may cause performance issues. Consider {@link #scan(ScanOptions)} for large datasets.
*
* @param pattern must not be {@literal null}.
* @return empty {@link Set} if no match found. {@literal null} when used in pipeline / transaction.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisListCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisListCommands.java
index 8d174c89b8..18852d2f17 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisListCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisListCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisNode.java b/src/main/java/org/springframework/data/redis/connection/RedisNode.java
index fa04f94245..3e117e0d36 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisNode.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisNode.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisPassword.java b/src/main/java/org/springframework/data/redis/connection/RedisPassword.java
index 56229c84ff..fc5280c28d 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisPassword.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisPassword.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -34,6 +34,7 @@
*
* @author Mark Paluch
* @author Christoph Strobl
+ * @author Yong-Hyun Kim
* @since 2.0
*/
public class RedisPassword {
@@ -54,10 +55,11 @@ private RedisPassword(char[] thePassword) {
*/
public static RedisPassword of(@Nullable String passwordAsString) {
- return Optional.ofNullable(passwordAsString) //
- .filter(StringUtils::hasText) //
- .map(it -> new RedisPassword(it.toCharArray())) //
- .orElseGet(RedisPassword::none);
+ if (!StringUtils.hasText(passwordAsString)) {
+ return none();
+ }
+
+ return new RedisPassword(passwordAsString.toCharArray());
}
/**
@@ -68,10 +70,11 @@ public static RedisPassword of(@Nullable String passwordAsString) {
*/
public static RedisPassword of(@Nullable char[] passwordAsChars) {
- return Optional.ofNullable(passwordAsChars) //
- .filter(it -> !ObjectUtils.isEmpty(passwordAsChars)) //
- .map(it -> new RedisPassword(Arrays.copyOf(it, it.length))) //
- .orElseGet(RedisPassword::none);
+ if (ObjectUtils.isEmpty(passwordAsChars)) {
+ return none();
+ }
+
+ return new RedisPassword(Arrays.copyOf(passwordAsChars, passwordAsChars.length));
}
/**
@@ -138,11 +141,6 @@ public Optional toOptional() {
return Optional.empty();
}
- @Override
- public String toString() {
- return "%s[%s]".formatted(getClass().getSimpleName(), isPresent() ? "*****" : "");
- }
-
@Override
public boolean equals(@Nullable Object o) {
@@ -160,4 +158,10 @@ public boolean equals(@Nullable Object o) {
public int hashCode() {
return ObjectUtils.nullSafeHashCode(thePassword);
}
+
+ @Override
+ public String toString() {
+ return "%s[%s]".formatted(getClass().getSimpleName(), isPresent() ? "*****" : "");
+ }
+
}
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisPipelineException.java b/src/main/java/org/springframework/data/redis/connection/RedisPipelineException.java
index 9a6e31ca16..0f4cd4c9e5 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisPipelineException.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisPipelineException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisPubSubCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisPubSubCommands.java
index 6f25eb7daa..00283e80ce 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisPubSubCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisPubSubCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisScriptingCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisScriptingCommands.java
index 1fd9e96afd..ce54c205cd 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisScriptingCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisScriptingCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2012-2024 the original author or authors.
+ * Copyright 2012-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisSentinelCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisSentinelCommands.java
index 25f3fb666f..0a3882e643 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisSentinelCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisSentinelCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisSentinelConfiguration.java b/src/main/java/org/springframework/data/redis/connection/RedisSentinelConfiguration.java
index f0dedc2e74..5839a8f701 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisSentinelConfiguration.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisSentinelConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisSentinelConnection.java b/src/main/java/org/springframework/data/redis/connection/RedisSentinelConnection.java
index 0d84cc2107..34f0db6003 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisSentinelConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisSentinelConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisServer.java b/src/main/java/org/springframework/data/redis/connection/RedisServer.java
index 1a8b306c45..bd363598c6 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisServer.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisServer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisServerCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisServerCommands.java
index 26a610e05c..f21e6281fd 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisServerCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisServerCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisSetCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisSetCommands.java
index bd3e75deb8..255b8f5f0b 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisSetCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisSetCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -183,7 +183,6 @@ public interface RedisSetCommands {
@Nullable
Long sUnionStore(byte[] destKey, byte[]... keys);
-
/**
* Get all elements of set at {@code key}.
*
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisSocketConfiguration.java b/src/main/java/org/springframework/data/redis/connection/RedisSocketConfiguration.java
index 4f9a0336db..e48799a659 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisSocketConfiguration.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisSocketConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisStandaloneConfiguration.java b/src/main/java/org/springframework/data/redis/connection/RedisStandaloneConfiguration.java
index d106dda372..c52b9f0a9f 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisStandaloneConfiguration.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisStandaloneConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -23,8 +23,8 @@
import org.springframework.util.ObjectUtils;
/**
- * Configuration class used to set up a {@link RedisConnection} with {@link RedisConnectionFactory} for connecting
- * to a single node Redis instance.
+ * Configuration class used to set up a {@link RedisConnection} with {@link RedisConnectionFactory} for connecting to a
+ * single node Redis instance.
*
* @author Mark Paluch
* @author Christoph Strobl
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisStaticMasterReplicaConfiguration.java b/src/main/java/org/springframework/data/redis/connection/RedisStaticMasterReplicaConfiguration.java
index f3033f8176..66dd6f6051 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisStaticMasterReplicaConfiguration.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisStaticMasterReplicaConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisStreamCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisStreamCommands.java
index df097158b0..8385d70d34 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisStreamCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisStreamCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisStringCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisStringCommands.java
index fe2abfce88..007bbc774c 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisStringCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisStringCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisSubscribedConnectionException.java b/src/main/java/org/springframework/data/redis/connection/RedisSubscribedConnectionException.java
index 56ce5a9f35..846a935c4d 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisSubscribedConnectionException.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisSubscribedConnectionException.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisTxCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisTxCommands.java
index 8e3578dbc2..56ad3634ea 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisTxCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisTxCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/RedisZSetCommands.java b/src/main/java/org/springframework/data/redis/connection/RedisZSetCommands.java
index 8578d688f6..6ad0ecd59b 100644
--- a/src/main/java/org/springframework/data/redis/connection/RedisZSetCommands.java
+++ b/src/main/java/org/springframework/data/redis/connection/RedisZSetCommands.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ReturnType.java b/src/main/java/org/springframework/data/redis/connection/ReturnType.java
index 5ed9e24dbf..b39a9684ce 100644
--- a/src/main/java/org/springframework/data/redis/connection/ReturnType.java
+++ b/src/main/java/org/springframework/data/redis/connection/ReturnType.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,12 +46,12 @@ public enum ReturnType {
MULTI,
/**
- * Returned as {@literal byte[]}
+ * Returned as {@code byte[]}
*/
STATUS,
/**
- * Returned as {@literal byte[]}
+ * Returned as {@code byte[]}
*/
VALUE;
@@ -73,7 +73,11 @@ public static ReturnType fromJavaType(@Nullable Class> javaType) {
return ReturnType.BOOLEAN;
}
- if (ClassUtils.isAssignable(Long.class, javaType)) {
+ if (ClassUtils.isAssignable(Double.class, javaType) || ClassUtils.isAssignable(Float.class, javaType)) {
+ return ReturnType.VALUE;
+ }
+
+ if (ClassUtils.isAssignable(Number.class, javaType)) {
return ReturnType.INTEGER;
}
diff --git a/src/main/java/org/springframework/data/redis/connection/SentinelMasterId.java b/src/main/java/org/springframework/data/redis/connection/SentinelMasterId.java
index 10954f4caa..ce778884d7 100644
--- a/src/main/java/org/springframework/data/redis/connection/SentinelMasterId.java
+++ b/src/main/java/org/springframework/data/redis/connection/SentinelMasterId.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/SortParameters.java b/src/main/java/org/springframework/data/redis/connection/SortParameters.java
index b90d56c6a9..27804b98fe 100644
--- a/src/main/java/org/springframework/data/redis/connection/SortParameters.java
+++ b/src/main/java/org/springframework/data/redis/connection/SortParameters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java b/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java
index e198eecfd3..67e9ced9d3 100644
--- a/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/StringRedisConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -71,7 +71,6 @@
* @author Andrey Shlykov
* @author ihaohong
* @author Shyngys Sapraliyev
- *
* @see RedisCallback
* @see RedisSerializer
* @see StringRedisTemplate
@@ -186,7 +185,10 @@ interface StringTuple extends Tuple {
Long touch(String... keys);
/**
- * Find all keys matching the given {@code pattern}.
+ * Retrieve all keys matching the given pattern via {@code KEYS} command.
+ *
+ * IMPORTANT: This command is non-interruptible and scans the entire keyspace which may cause
+ * performance issues. Consider {@link #scan(ScanOptions)} for large datasets.
*
* @param pattern must not be {@literal null}.
* @return
@@ -1661,7 +1663,6 @@ default Long lPos(String key, String element) {
*/
Long zRemRange(String key, long start, long end);
-
/**
* Remove all elements between the lexicographical {@link Range}.
*
@@ -1941,7 +1942,8 @@ default Set zUnionWithScores(Aggregate aggregate, int[] weights, St
* @return
* @since 1.6
* @see Redis Documentation: ZRANGEBYLEX
- * @see RedisZSetCommands#zRangeByLex(byte[], org.springframework.data.domain.Range, org.springframework.data.redis.connection.Limit)
+ * @see RedisZSetCommands#zRangeByLex(byte[], org.springframework.data.domain.Range,
+ * org.springframework.data.redis.connection.Limit)
*/
Set zRangeByLex(String key, org.springframework.data.domain.Range range,
org.springframework.data.redis.connection.Limit limit);
@@ -1983,7 +1985,8 @@ default Set zRevRangeByLex(String key, org.springframework.data.domain.R
* @return
* @since 2.4
* @see Redis Documentation: ZREVRANGEBYLEX
- * @see RedisZSetCommands#zRevRangeByLex(byte[], org.springframework.data.domain.Range, org.springframework.data.redis.connection.Limit)
+ * @see RedisZSetCommands#zRevRangeByLex(byte[], org.springframework.data.domain.Range,
+ * org.springframework.data.redis.connection.Limit)
*/
Set zRevRangeByLex(String key, org.springframework.data.domain.Range range,
org.springframework.data.redis.connection.Limit limit);
@@ -2556,8 +2559,7 @@ GeoResults> geoRadiusByMember(String key, String member, Dis
/**
* Return the members of a geo set which are within the borders of the area specified by a given {@link GeoShape
- * shape}. The query's center point is provided by
- * {@link GeoReference}.
+ * shape}. The query's center point is provided by {@link GeoReference}.
*
* @param key must not be {@literal null}.
* @param reference must not be {@literal null}.
@@ -2573,8 +2575,7 @@ GeoResults> geoSearch(String key, GeoReference refer
/**
* Query the members of a geo set which are within the borders of the area specified by a given {@link GeoShape shape}
- * and store the result at {@code destKey}. The query's center point is provided by
- * {@link GeoReference}.
+ * and store the result at {@code destKey}. The query's center point is provided by {@link GeoReference}.
*
* @param key must not be {@literal null}.
* @param reference must not be {@literal null}.
diff --git a/src/main/java/org/springframework/data/redis/connection/Subscription.java b/src/main/java/org/springframework/data/redis/connection/Subscription.java
index 8fbbb32239..96510df79c 100644
--- a/src/main/java/org/springframework/data/redis/connection/Subscription.java
+++ b/src/main/java/org/springframework/data/redis/connection/Subscription.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2024 the original author or authors.
+ * Copyright 2011-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/SubscriptionListener.java b/src/main/java/org/springframework/data/redis/connection/SubscriptionListener.java
index 5049ef2423..8d9e9d6b00 100644
--- a/src/main/java/org/springframework/data/redis/connection/SubscriptionListener.java
+++ b/src/main/java/org/springframework/data/redis/connection/SubscriptionListener.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2021-2024 the original author or authors.
+ * Copyright 2021-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/ValueEncoding.java b/src/main/java/org/springframework/data/redis/connection/ValueEncoding.java
index 1185756bf3..b0d573639a 100644
--- a/src/main/java/org/springframework/data/redis/connection/ValueEncoding.java
+++ b/src/main/java/org/springframework/data/redis/connection/ValueEncoding.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2018-2024 the original author or authors.
+ * Copyright 2018-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/Converters.java b/src/main/java/org/springframework/data/redis/connection/convert/Converters.java
index 2dc686bcf9..8a935f69f0 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/Converters.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/Converters.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -544,14 +544,11 @@ enum ClusterNodesConverter implements Converter {
*
*
{@code %s:%i} (Redis 3)
*
{@code %s:%i@%i} (Redis 4, with bus port)
- *
{@code %s:%i@%i,%s} (Redis 7, with announced hostname)
- *
- * The output of the {@code CLUSTER NODES } command is just a space-separated CSV string, where each
- * line represents a node in the cluster. The following is an example of output on Redis 7.2.0.
- * You can check the latest here.
- *
+ *
{@code %s:%i@%i,%s} (Redis 7, with announced hostname)
The output of the {@code CLUSTER NODES } command
+ * is just a space-separated CSV string, where each line represents a node in the cluster. The following is an
+ * example of output on Redis 7.2.0. You can check the latest
+ * here.
* {@code ... }
- *
*
*/
private static final Map flagLookupMap;
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/ListConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/ListConverter.java
index d9b87a8c86..1a384f1af7 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/ListConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/ListConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/LongToBooleanConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/LongToBooleanConverter.java
index 0e708780bc..8686258820 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/LongToBooleanConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/LongToBooleanConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/MapConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/MapConverter.java
index 2d9bafca65..1f09154cba 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/MapConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/MapConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/MapToPropertiesConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/MapToPropertiesConverter.java
index 2e1e93e155..b25e587e0a 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/MapToPropertiesConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/MapToPropertiesConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/SetConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/SetConverter.java
index 244306125e..c51002e368 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/SetConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/SetConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/StringToDataTypeConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/StringToDataTypeConverter.java
index 2d1ea32cc3..39214821ca 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/StringToDataTypeConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/StringToDataTypeConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/StringToPropertiesConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/StringToPropertiesConverter.java
index 7f8889eabc..16725f049c 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/StringToPropertiesConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/StringToPropertiesConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/StringToRedisClientInfoConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/StringToRedisClientInfoConverter.java
index d2bf3aa39e..4c01ddfe6a 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/StringToRedisClientInfoConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/StringToRedisClientInfoConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2014-2024 the original author or authors.
+ * Copyright 2014-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/convert/TransactionResultConverter.java b/src/main/java/org/springframework/data/redis/connection/convert/TransactionResultConverter.java
index 883ceb9e15..2655245ceb 100644
--- a/src/main/java/org/springframework/data/redis/connection/convert/TransactionResultConverter.java
+++ b/src/main/java/org/springframework/data/redis/connection/convert/TransactionResultConverter.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2013-2024 the original author or authors.
+ * Copyright 2013-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/jedis/DefaultJedisClientConfiguration.java b/src/main/java/org/springframework/data/redis/connection/jedis/DefaultJedisClientConfiguration.java
index 683c0ec55a..3af45729db 100644
--- a/src/main/java/org/springframework/data/redis/connection/jedis/DefaultJedisClientConfiguration.java
+++ b/src/main/java/org/springframework/data/redis/connection/jedis/DefaultJedisClientConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -46,10 +46,9 @@ class DefaultJedisClientConfiguration implements JedisClientConfiguration {
private final Duration connectTimeout;
DefaultJedisClientConfiguration(@Nullable JedisClientConfigBuilderCustomizer customizer, boolean useSsl,
- @Nullable SSLSocketFactory sslSocketFactory,
- @Nullable SSLParameters sslParameters, @Nullable HostnameVerifier hostnameVerifier, boolean usePooling,
- @Nullable GenericObjectPoolConfig poolConfig, @Nullable String clientName, Duration readTimeout,
- Duration connectTimeout) {
+ @Nullable SSLSocketFactory sslSocketFactory, @Nullable SSLParameters sslParameters,
+ @Nullable HostnameVerifier hostnameVerifier, boolean usePooling, @Nullable GenericObjectPoolConfig poolConfig,
+ @Nullable String clientName, Duration readTimeout, Duration connectTimeout) {
this.customizer = Optional.ofNullable(customizer);
this.useSsl = useSsl;
diff --git a/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientConfigBuilderCustomizer.java b/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientConfigBuilderCustomizer.java
index 8f508c374f..44e8855bf8 100644
--- a/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientConfigBuilderCustomizer.java
+++ b/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientConfigBuilderCustomizer.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2024 the original author or authors.
+ * Copyright 2024-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientConfiguration.java b/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientConfiguration.java
index b6b9a22467..6cf9357dfa 100644
--- a/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientConfiguration.java
+++ b/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientConfiguration.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientUtils.java b/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientUtils.java
index af7707d9ae..ab8d1d072b 100644
--- a/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientUtils.java
+++ b/src/main/java/org/springframework/data/redis/connection/jedis/JedisClientUtils.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2017-2024 the original author or authors.
+ * Copyright 2017-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
diff --git a/src/main/java/org/springframework/data/redis/connection/jedis/JedisClusterConnection.java b/src/main/java/org/springframework/data/redis/connection/jedis/JedisClusterConnection.java
index 9dc9af5cbb..f03899c271 100644
--- a/src/main/java/org/springframework/data/redis/connection/jedis/JedisClusterConnection.java
+++ b/src/main/java/org/springframework/data/redis/connection/jedis/JedisClusterConnection.java
@@ -1,5 +1,5 @@
/*
- * Copyright 2015-2024 the original author or authors.
+ * Copyright 2015-2025 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -171,8 +171,8 @@ public Object execute(String command, byte[]... args) {
Assert.notNull(command, "Command must not be null");
Assert.notNull(args, "Args must not be null");
- JedisClusterCommandCallback