From 49f3f4e0d3ae4aa29a4cb4e45f535dcf6259a8a7 Mon Sep 17 00:00:00 2001 From: Mark Paluch Date: Thu, 28 Nov 2024 08:40:25 +0100 Subject: [PATCH] Polishing. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Tweak Javadoc wording for execute(…) with callback methods. See #3049 Original pull request: #3055 --- .../data/redis/core/RedisOperations.java | 20 +++++++++++++------ 1 file changed, 14 insertions(+), 6 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 e3ca686a1e..38d2a39c52 100644 --- a/src/main/java/org/springframework/data/redis/core/RedisOperations.java +++ b/src/main/java/org/springframework/data/redis/core/RedisOperations.java @@ -62,7 +62,7 @@ public interface RedisOperations { * * @param return type * @param action callback object that specifies the Redis action. Must not be {@literal null}. - * @return a result object returned by the action or {@literal null} + * @return result of the given {@link RedisCallback#doInRedis(RedisConnection)} invocation. */ @Nullable T execute(RedisCallback action); @@ -73,7 +73,7 @@ public interface RedisOperations { * * @param return type * @param session session callback. Must not be {@literal null}. - * @return result object returned by the action or {@literal null} + * @return result of the given {@link SessionCallback#execute(RedisOperations)} invocation. */ @Nullable T execute(SessionCallback session); @@ -84,7 +84,9 @@ public interface RedisOperations { * serializers to deserialize results * * @param action callback object to execute - * @return list of objects returned by the pipeline + * @return pipeline results of the given {@link RedisCallback#doInRedis(RedisConnection)} invocation. Results are + * collected from {@link RedisConnection} calls, {@link RedisCallback#doInRedis(RedisConnection)} itself must + * return {@literal null}. */ List executePipelined(RedisCallback action); @@ -95,7 +97,9 @@ public interface RedisOperations { * @param action callback object to execute * @param resultSerializer The Serializer to use for individual values or Collections of values. If any returned * values are hashes, this serializer will be used to deserialize both the key and value - * @return list of objects returned by the pipeline + * @return pipeline results of the given {@link RedisCallback#doInRedis(RedisConnection)} invocation. Results are + * collected from {@link RedisConnection} calls, {@link RedisCallback#doInRedis(RedisConnection)} itself must + * return {@literal null}. */ List executePipelined(RedisCallback action, RedisSerializer resultSerializer); @@ -104,7 +108,9 @@ public interface RedisOperations { * callback cannot return a non-null value as it gets overwritten by the pipeline. * * @param session Session callback - * @return list of objects returned by the pipeline + * @return pipeline results of the given {@link SessionCallback#execute(RedisOperations)} invocation. Results are + * collected from {@link RedisOperations} calls, {@link SessionCallback#execute(RedisOperations)} itself must + * return {@literal null}. */ List executePipelined(SessionCallback session); @@ -115,7 +121,9 @@ public interface RedisOperations { * * @param session Session callback * @param resultSerializer - * @return list of objects returned by the pipeline + * @return pipeline results of the given {@link SessionCallback#execute(RedisOperations)} invocation. Results are + * collected from {@link RedisOperations} calls, {@link SessionCallback#execute(RedisOperations)} itself must + * return {@literal null}. */ List executePipelined(SessionCallback session, RedisSerializer resultSerializer);