Skip to content

Commit

Permalink
rpc: use telescopic methods
Browse files Browse the repository at this point in the history
Motivation:
helper methods needs different number of arguments. Telescopic methods make
code more readable and simpler to maintain.

Modification:
use telescopic methods for various RpcCall#call methods.

Result:
more readable code.

Acked-by: Albert Rossi
Target: master
  • Loading branch information
kofemann committed Jul 23, 2018
1 parent c28f306 commit 1e38f5c
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -403,23 +403,23 @@ public void call(int procedure, XdrAble args, CompletionHandler<RpcReply, RpcTra
*/
public void call(int procedure, XdrAble args, CompletionHandler<RpcReply, RpcTransport> callback, long timeoutValue, TimeUnit timeoutUnits)
throws IOException {
callInternal(procedure, args, callback, timeoutValue, timeoutUnits, null);
call(procedure, args, callback, timeoutValue, timeoutUnits, null);
}

/**
* convenience version of {@link #call(int, XdrAble, CompletionHandler, long, TimeUnit, RpcAuth)} with no timeout
*/
public void call(int procedure, XdrAble args, CompletionHandler<RpcReply, RpcTransport> callback, RpcAuth auth)
throws IOException {
callInternal(procedure, args, callback, 0, null, auth);
call(procedure, args, callback, 0, null, auth);
}

/**
* convenience version of {@link #call(int, XdrAble, CompletionHandler, long, TimeUnit, RpcAuth)} with no timeout or auth
*/
public void call(int procedure, XdrAble args, CompletionHandler<RpcReply, RpcTransport> callback)
throws IOException {
callInternal(procedure, args, callback, 0, null, null);
call(procedure, args, callback, 0, null, null);
}

/**
Expand Down

0 comments on commit 1e38f5c

Please sign in to comment.