Skip to content

Commit

Permalink
Minor rename.
Browse files Browse the repository at this point in the history
Signed-off-by: Yury-Fridlyand <[email protected]>
  • Loading branch information
Yury-Fridlyand committed Nov 15, 2023
1 parent ac59357 commit c43f96a
Showing 1 changed file with 2 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@
import javababushka.client.RedisClient;
import org.apache.commons.lang3.tuple.Pair;

import java.net.SocketAddress;
import java.util.*;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.ExecutionException;
Expand Down Expand Up @@ -271,7 +270,7 @@ public String get(String key) {
// TODO support non-strings
}

private synchronized Pair<Integer, CompletableFuture<Response>> getNextCallbackId() {
private synchronized Pair<Integer, CompletableFuture<Response>> getNextCallback() {
var future = new CompletableFuture<Response>();
responses.add(future);
return Pair.of(responses.size() - 1, future);
Expand Down Expand Up @@ -390,7 +389,7 @@ public Future<Response> asyncConnectToRedis(ConnectionSettings connectionSetting
}

private CompletableFuture<Response> submitNewCommand(RequestType command, List<String> args) {
var commandId = getNextCallbackId();
var commandId = getNextCallback();
//System.out.printf("== %s(%s), callback %d%n", command, String.join(", ", args), commandId);

return CompletableFuture.supplyAsync(() -> {
Expand Down

0 comments on commit c43f96a

Please sign in to comment.