Skip to content

Commit 24b8a7a

Browse files
committed
Polishing #1982
Add since tags, switch count to long type.
1 parent b5d6eef commit 24b8a7a

File tree

11 files changed

+54
-25
lines changed

11 files changed

+54
-25
lines changed

src/main/java/io/lettuce/core/AbstractRedisAsyncCommands.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2141,7 +2141,7 @@ public RedisFuture<Long> zintercard(K... keys) {
21412141
}
21422142

21432143
@Override
2144-
public RedisFuture<Long> zintercard(int limit, K... keys) {
2144+
public RedisFuture<Long> zintercard(long limit, K... keys) {
21452145
return dispatch(commandBuilder.zintercard(limit, keys));
21462146
}
21472147

src/main/java/io/lettuce/core/AbstractRedisReactiveCommands.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2214,7 +2214,7 @@ public Mono<Long> zintercard(K... keys) {
22142214
}
22152215

22162216
@Override
2217-
public Mono<Long> zintercard(int limit, K... keys) {
2217+
public Mono<Long> zintercard(long limit, K... keys) {
22182218
return createMono(() -> commandBuilder.zintercard(limit, keys));
22192219
}
22202220

src/main/java/io/lettuce/core/RedisCommandBuilder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3098,7 +3098,7 @@ Command<K, V, Long> zintercard(K... keys) {
30983098
return createCommand(ZINTERCARD, new IntegerOutput<>(codec), args);
30993099
}
31003100

3101-
Command<K, V, Long> zintercard(int limit, K... keys) {
3101+
Command<K, V, Long> zintercard(long limit, K... keys) {
31023102
notEmpty(keys);
31033103

31043104
CommandArgs<K, V> args = new CommandArgs<>(codec).add(keys.length).addKeys(keys).add(LIMIT).add(limit);

src/main/java/io/lettuce/core/api/async/RedisSortedSetAsyncCommands.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,22 +279,26 @@ public interface RedisSortedSetAsyncCommands<K, V> {
279279
RedisFuture<List<V>> zinter(ZAggregateArgs aggregateArgs, K... keys);
280280

281281
/**
282-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
282+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
283+
* the cardinality of the result.
283284
*
284285
* @param keys the keys.
285286
* @return Long Integer reply the number of elements in the resulting intersection.
287+
* @since 6.2
286288
*/
287289
RedisFuture<Long> zintercard(K... keys);
288290

289291
/**
290-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
292+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
293+
* the cardinality of the result.
291294
*
292295
* @param limit If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and
293296
* yield limit as the cardinality
294297
* @param keys the keys.
295298
* @return Long Integer reply the number of elements in the resulting intersection.
299+
* @since 6.2
296300
*/
297-
RedisFuture<Long> zintercard(int limit, K... keys);
301+
RedisFuture<Long> zintercard(long limit, K... keys);
298302

299303
/**
300304
* Intersect multiple sorted sets and returns the resulting sorted.

src/main/java/io/lettuce/core/api/reactive/RedisSortedSetReactiveCommands.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -281,22 +281,26 @@ public interface RedisSortedSetReactiveCommands<K, V> {
281281
Flux<V> zinter(ZAggregateArgs aggregateArgs, K... keys);
282282

283283
/**
284-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
284+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
285+
* the cardinality of the result.
285286
*
286287
* @param keys the keys.
287288
* @return Long Integer reply the number of elements in the resulting intersection.
289+
* @since 6.2
288290
*/
289291
Mono<Long> zintercard(K... keys);
290292

291293
/**
292-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
294+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
295+
* the cardinality of the result.
293296
*
294297
* @param limit If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and
295298
* yield limit as the cardinality
296299
* @param keys the keys.
297300
* @return Long Integer reply the number of elements in the resulting intersection.
301+
* @since 6.2
298302
*/
299-
Mono<Long> zintercard(int limit, K... keys);
303+
Mono<Long> zintercard(long limit, K... keys);
300304

301305
/**
302306
* Intersect multiple sorted sets and returns the resulting sorted.

src/main/java/io/lettuce/core/api/sync/RedisSortedSetCommands.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,22 +279,26 @@ public interface RedisSortedSetCommands<K, V> {
279279
List<V> zinter(ZAggregateArgs aggregateArgs, K... keys);
280280

281281
/**
282-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
282+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
283+
* the cardinality of the result.
283284
*
284285
* @param keys the keys.
285286
* @return Long Integer reply the number of elements in the resulting intersection.
287+
* @since 6.2
286288
*/
287289
Long zintercard(K... keys);
288290

289291
/**
290-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
292+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
293+
* the cardinality of the result.
291294
*
292295
* @param limit If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and
293296
* yield limit as the cardinality
294297
* @param keys the keys.
295298
* @return Long Integer reply the number of elements in the resulting intersection.
299+
* @since 6.2
296300
*/
297-
Long zintercard(int limit, K... keys);
301+
Long zintercard(long limit, K... keys);
298302

299303
/**
300304
* Intersect multiple sorted sets and returns the resulting sorted.

src/main/java/io/lettuce/core/cluster/api/async/NodeSelectionSortedSetAsyncCommands.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,22 +279,26 @@ public interface NodeSelectionSortedSetAsyncCommands<K, V> {
279279
AsyncExecutions<List<V>> zinter(ZAggregateArgs aggregateArgs, K... keys);
280280

281281
/**
282-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
282+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
283+
* the cardinality of the result.
283284
*
284285
* @param keys the keys.
285286
* @return Long Integer reply the number of elements in the resulting intersection.
287+
* @since 6.2
286288
*/
287289
AsyncExecutions<Long> zintercard(K... keys);
288290

289291
/**
290-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
292+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
293+
* the cardinality of the result.
291294
*
292295
* @param limit If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and
293296
* yield limit as the cardinality
294297
* @param keys the keys.
295298
* @return Long Integer reply the number of elements in the resulting intersection.
299+
* @since 6.2
296300
*/
297-
AsyncExecutions<Long> zintercard(int limit, K... keys);
301+
AsyncExecutions<Long> zintercard(long limit, K... keys);
298302

299303
/**
300304
* Intersect multiple sorted sets and returns the resulting sorted.

src/main/java/io/lettuce/core/cluster/api/sync/NodeSelectionSortedSetCommands.java

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -279,22 +279,26 @@ public interface NodeSelectionSortedSetCommands<K, V> {
279279
Executions<List<V>> zinter(ZAggregateArgs aggregateArgs, K... keys);
280280

281281
/**
282-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
282+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
283+
* the cardinality of the result.
283284
*
284285
* @param keys the keys.
285286
* @return Long Integer reply the number of elements in the resulting intersection.
287+
* @since 6.2
286288
*/
287289
Executions<Long> zintercard(K... keys);
288290

289291
/**
290-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
292+
* This command is similar to {@link #zinter(java.lang.Object[])}, but instead of returning the result set, it returns just
293+
* the cardinality of the result.
291294
*
292295
* @param limit If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and
293296
* yield limit as the cardinality
294297
* @param keys the keys.
295298
* @return Long Integer reply the number of elements in the resulting intersection.
299+
* @since 6.2
296300
*/
297-
Executions<Long> zintercard(int limit, K... keys);
301+
Executions<Long> zintercard(long limit, K... keys);
298302

299303
/**
300304
* Intersect multiple sorted sets and returns the resulting sorted.

src/main/kotlin/io/lettuce/core/api/coroutines/RedisSortedSetCoroutinesCommands.kt

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -254,22 +254,26 @@ interface RedisSortedSetCoroutinesCommands<K : Any, V : Any> {
254254
fun zinter(aggregateArgs: ZAggregateArgs, vararg keys: K): Flow<V>
255255

256256
/**
257-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
257+
* This command is similar to {@link #zinter(Any[])}, but instead of returning the result set, it returns just
258+
* the cardinality of the result.
258259
*
259260
* @param keys the keys.
260261
* @return Long Integer reply the number of elements in the resulting intersection.
262+
* @since 6.2
261263
*/
262264
suspend fun zintercard(vararg keys: K): Long?
263265

264266
/**
265-
* This command is similar to ZINTER, but instead of returning the result set, it returns just the cardinality of the result.
267+
* This command is similar to {@link #zinter(Any[])}, but instead of returning the result set, it returns just
268+
* the cardinality of the result.
266269
*
267270
* @param limit If the intersection cardinality reaches limit partway through the computation, the algorithm will exit and
268271
* yield limit as the cardinality
269272
* @param keys the keys.
270273
* @return Long Integer reply the number of elements in the resulting intersection.
274+
* @since 6.2
271275
*/
272-
suspend fun zintercard(limit: Int, vararg keys: K): Long?
276+
suspend fun zintercard(limit: Long, vararg keys: K): Long?
273277

274278
/**
275279
* Intersect multiple sorted sets and returns the resulting sorted.

src/main/kotlin/io/lettuce/core/api/coroutines/RedisSortedSetCoroutinesCommandsImpl.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,8 @@ internal class RedisSortedSetCoroutinesCommandsImpl<K : Any, V : Any>(internal v
103103

104104
override suspend fun zintercard(vararg keys: K): Long? = ops.zintercard(*keys).awaitFirstOrNull()
105105

106-
override suspend fun zintercard(limit: Int, vararg keys: K): Long? = ops.zintercard(limit, *keys).awaitFirstOrNull()
106+
override suspend fun zintercard(limit: Long, vararg keys: K): Long? =
107+
ops.zintercard(limit, *keys).awaitFirstOrNull()
107108

108109
override fun zinterWithScores(vararg keys: K): Flow<ScoredValue<V>> = ops.zinterWithScores(*keys).asFlow()
109110

0 commit comments

Comments
 (0)