1818import reactor .core .publisher .Flux ;
1919
2020import java .nio .ByteBuffer ;
21+ import java .util .Arrays ;
2122import java .util .Collections ;
2223import java .util .List ;
2324
3031 * <p>
3132 * Streams of methods returning {@code Mono<K>} or {@code Flux<M>} are terminated with
3233 * {@link org.springframework.dao.InvalidDataAccessApiUsageException} when
33- * {@link org.springframework.data.redis.serializer.RedisElementReader#read(ByteBuffer)} returns {@code null} for a
34- * particular element as Reactive Streams prohibit the usage of {@code null} values.
34+ * {@link org.springframework.data.redis.serializer.RedisElementReader#read(ByteBuffer)} returns {@literal null} for a
35+ * particular element as Reactive Streams prohibit the usage of {@literal null} values.
3536 *
3637 * @author Mark Paluch
3738 * @author Christoph Strobl
@@ -67,8 +68,22 @@ default <T> Flux<T> execute(RedisScript<T> script, List<K> keys) {
6768 * Executes the given {@link RedisScript}
6869 *
6970 * @param script The script to execute. Must not be {@literal null}.
70- * @param keys Any keys that need to be passed to the script. Must not be {@literal null}.
71- * @param args Any args that need to be passed to the script. Can be {@literal empty}.
71+ * @param keys any keys that need to be passed to the script. Must not be {@literal null}.
72+ * @param args any args that need to be passed to the script. Can be {@literal empty}.
73+ * @return The return value of the script or {@link Flux#empty()} if {@link RedisScript#getResultType()} is
74+ * {@literal null}, likely indicating a throw-away status reply (i.e. "OK")
75+ * @since 3.4
76+ */
77+ default <T > Flux <T > execute (RedisScript <T > script , List <K > keys , Object ... args ) {
78+ return execute (script , keys , Arrays .asList (args ));
79+ }
80+
81+ /**
82+ * Executes the given {@link RedisScript}
83+ *
84+ * @param script The script to execute. Must not be {@literal null}.
85+ * @param keys any keys that need to be passed to the script. Must not be {@literal null}.
86+ * @param args any args that need to be passed to the script. Can be {@literal empty}.
7287 * @return The return value of the script or {@link Flux#empty()} if {@link RedisScript#getResultType()} is
7388 * {@literal null}, likely indicating a throw-away status reply (i.e. "OK")
7489 */
@@ -79,8 +94,8 @@ default <T> Flux<T> execute(RedisScript<T> script, List<K> keys) {
7994 * arguments and result.
8095 *
8196 * @param script The script to execute. must not be {@literal null}.
82- * @param keys Any keys that need to be passed to the script
83- * @param args Any args that need to be passed to the script
97+ * @param keys any keys that need to be passed to the script.
98+ * @param args any args that need to be passed to the script.
8499 * @param argsWriter The {@link RedisElementWriter} to use for serializing args. Must not be {@literal null}.
85100 * @param resultReader The {@link RedisElementReader} to use for serializing the script return value. Must not be
86101 * {@literal null}.
0 commit comments