Skip to content

Commit 3e16cc1

Browse files
marcingrzejszczakmp911de
authored andcommitted
Adds missing javadocs for RedisOperations.hasKey().
Also, added missing javadocs about what the method returns and about nullability. Closes #3049 Original pull request: #3055
1 parent 1ceb7ed commit 3e16cc1

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/main/java/org/springframework/data/redis/core/RedisOperations.java

+5-4
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
* @author Todd Merrill
4848
* @author Chen Li
4949
* @author Vedran Pavic
50+
* @author Marcin Grzejszczak
5051
*/
5152
public interface RedisOperations<K, V> {
5253

@@ -151,7 +152,7 @@ <T> T execute(RedisScript<T> script, RedisSerializer<?> argsSerializer, RedisSer
151152
* to free resources after use.
152153
*
153154
* @param callback must not be {@literal null}.
154-
* @return
155+
* @return the {@link Object result} of the operation performed in the callback or {@literal null}.
155156
* @since 1.8
156157
*/
157158
@Nullable
@@ -167,7 +168,7 @@ <T> T execute(RedisScript<T> script, RedisSerializer<?> argsSerializer, RedisSer
167168
* @param sourceKey must not be {@literal null}.
168169
* @param targetKey must not be {@literal null}.
169170
* @param replace whether the key was copied. {@literal null} when used in pipeline / transaction.
170-
* @return
171+
* @return {@code true} when copied successfully or {@literal null} when used in pipeline / transaction.
171172
* @see <a href="https://redis.io/commands/copy">Redis Documentation: COPY</a>
172173
* @since 2.6
173174
*/
@@ -178,7 +179,7 @@ <T> T execute(RedisScript<T> script, RedisSerializer<?> argsSerializer, RedisSer
178179
* Determine if given {@code key} exists.
179180
*
180181
* @param key must not be {@literal null}.
181-
* @return
182+
* @return {@literal true} if key exists. {@literal null} when used in pipeline / transaction.
182183
* @see <a href="https://redis.io/commands/exists">Redis Documentation: EXISTS</a>
183184
*/
184185
@Nullable
@@ -361,7 +362,7 @@ default Boolean expireAt(K key, Instant expireAt) {
361362
* Remove the expiration from given {@code key}.
362363
*
363364
* @param key must not be {@literal null}.
364-
* @return {@literal null} when used in pipeline / transaction.
365+
* @return {@code true} when persisted successfully or {@literal null} when used in pipeline / transaction.
365366
* @see <a href="https://redis.io/commands/persist">Redis Documentation: PERSIST</a>
366367
*/
367368
@Nullable

0 commit comments

Comments
 (0)