Skip to content

Commit

Permalink
API change from Future to RedisFuture in getMasterAddrByName
Browse files Browse the repository at this point in the history
  • Loading branch information
mp911de committed Jun 7, 2015
1 parent 5c298d8 commit 235461a
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,18 @@ public SocketAddress get() {

if (t != null) {
convert.completeExceptionally(t);
} else if (!list.isEmpty()) {
return;
}

if (!list.isEmpty()) {
checkArgument(list.size() == 2, "List must contain exact 2 entries (Hostname, Port)");
String hostname = (String) list.get(0);
String port = (String) list.get(1);
ref.set(new InetSocketAddress(hostname, Integer.parseInt(port)));
convert.complete();
}

convert.complete();

});

return convert;
Expand Down

0 comments on commit 235461a

Please sign in to comment.