18
18
import reactor .core .publisher .Flux ;
19
19
20
20
import java .nio .ByteBuffer ;
21
+ import java .util .Arrays ;
21
22
import java .util .Collections ;
22
23
import java .util .List ;
23
24
30
31
* <p>
31
32
* Streams of methods returning {@code Mono<K>} or {@code Flux<M>} are terminated with
32
33
* {@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.
35
36
*
36
37
* @author Mark Paluch
37
38
* @author Christoph Strobl
@@ -67,8 +68,22 @@ default <T> Flux<T> execute(RedisScript<T> script, List<K> keys) {
67
68
* Executes the given {@link RedisScript}
68
69
*
69
70
* @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}.
72
87
* @return The return value of the script or {@link Flux#empty()} if {@link RedisScript#getResultType()} is
73
88
* {@literal null}, likely indicating a throw-away status reply (i.e. "OK")
74
89
*/
@@ -79,8 +94,8 @@ default <T> Flux<T> execute(RedisScript<T> script, List<K> keys) {
79
94
* arguments and result.
80
95
*
81
96
* @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.
84
99
* @param argsWriter The {@link RedisElementWriter} to use for serializing args. Must not be {@literal null}.
85
100
* @param resultReader The {@link RedisElementReader} to use for serializing the script return value. Must not be
86
101
* {@literal null}.
0 commit comments