From 2298a86ea8fc8cd7860aab75c2750d216860a008 Mon Sep 17 00:00:00 2001 From: Marcin Grzejszczak Date: Mon, 25 Nov 2024 14:12:37 +0100 Subject: [PATCH] Adds missing javadocs for `RedisOperations.hasKey()`. Also, added missing javadocs about what the method returns and about nullability. Closes #3049 Original pull request: #3055 --- .../springframework/data/redis/core/RedisOperations.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/org/springframework/data/redis/core/RedisOperations.java b/src/main/java/org/springframework/data/redis/core/RedisOperations.java index 0869015a8f..e3ca686a1e 100644 --- a/src/main/java/org/springframework/data/redis/core/RedisOperations.java +++ b/src/main/java/org/springframework/data/redis/core/RedisOperations.java @@ -47,6 +47,7 @@ * @author Todd Merrill * @author Chen Li * @author Vedran Pavic + * @author Marcin Grzejszczak */ public interface RedisOperations { @@ -151,7 +152,7 @@ T execute(RedisScript script, RedisSerializer argsSerializer, RedisSer * to free resources after use. * * @param callback must not be {@literal null}. - * @return + * @return the {@link Object result} of the operation performed in the callback or {@literal null}. * @since 1.8 */ @Nullable @@ -167,7 +168,7 @@ T execute(RedisScript script, RedisSerializer argsSerializer, RedisSer * @param sourceKey must not be {@literal null}. * @param targetKey must not be {@literal null}. * @param replace whether the key was copied. {@literal null} when used in pipeline / transaction. - * @return + * @return {@code true} when copied successfully or {@literal null} when used in pipeline / transaction. * @see Redis Documentation: COPY * @since 2.6 */ @@ -178,7 +179,7 @@ T execute(RedisScript script, RedisSerializer argsSerializer, RedisSer * Determine if given {@code key} exists. * * @param key must not be {@literal null}. - * @return + * @return {@literal true} if key exists. {@literal null} when used in pipeline / transaction. * @see Redis Documentation: EXISTS */ @Nullable @@ -361,7 +362,7 @@ default Boolean expireAt(K key, Instant expireAt) { * Remove the expiration from given {@code key}. * * @param key must not be {@literal null}. - * @return {@literal null} when used in pipeline / transaction. + * @return {@code true} when persisted successfully or {@literal null} when used in pipeline / transaction. * @see Redis Documentation: PERSIST */ @Nullable