Skip to content

Commit

Permalink
PR comments.
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Apr 10, 2024
1 parent b5da47b commit 407c221
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,9 +285,10 @@ CompletableFuture<Double> zaddIncr(
* @param keys The keys of the sorted sets.
* @param timeout The number of seconds to wait for a blocking operation to complete. A value of
* <code>0</code> will block indefinitely.
* @return An array containing the key where the member was popped out, the member itself, and the
* member score.<br>
* If no member could be popped and the timeout expired, returns </code>null</code>.
* @return An <code>array</code> containing the key where the member was popped out, the member
* itself, and the member score.<br>
* If no member could be popped and the <code>timeout</code> expired, returns </code>null
* </code>.
* @example
* <pre>{@code
* Object[] data = client.bzpopmax(new String[] {"zset1", "zset2"}, 0.5).get();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1478,9 +1478,10 @@ public T zpopmax(@NonNull String key) {
* @param keys The keys of the sorted sets.
* @param timeout The number of seconds to wait for a blocking operation to complete. A value of
* <code>0</code> will block indefinitely.
* @return Command Response - An array containing the key where the member was popped out, the
* member itself, and the member score.<br>
* If no member could be popped and the timeout expired, returns </code>null</code>.
* @return Command Response - An <code>array</code> containing the key where the member was popped
* out, the member itself, and the member score.<br>
* If no member could be popped and the <code>timeout</code> expired, returns </code>null
* </code>.
*/
public T bzpopmax(@NonNull String[] keys, double timeout) {
ArgsArray commandArgs = buildArgs(ArrayUtils.add(keys, Double.toString(timeout)));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -334,10 +334,7 @@ public void transaction_builds_protobuf_request(BaseTransaction<?> transaction)
results.add(Pair.of(ZPopMax, buildArgs("key")));

transaction.bzpopmax(new String[] {"key1", "key2"}, .5);
results.add(
Pair.of(
BZPopMax,
ArgsArray.newBuilder().addArgs("key1").addArgs("key2").addArgs("0.5").build()));
results.add(Pair.of(BZPopMax, buildArgs("key1", "key2", "0.5")));

transaction.zpopmax("key", 2);
results.add(Pair.of(ZPopMax, buildArgs("key", "2")));
Expand Down

0 comments on commit 407c221

Please sign in to comment.