void channelClosed(Throwable ex) {
   if (ex != null) {
     RpcException e;
     if (ex instanceof RpcException) {
       e = (RpcException) ex;
     } else {
       e = new RpcException(ex);
     }
     for (RpcOutcome<?> f : map.values()) {
       f.setException(e);
     }
   }
 }
 public void updateFailedFuture(int coordinationId, RpcFailure failure) {
   // logger.debug("Updating failed future.");
   RpcOutcome<?> rpc = removeFromMap(coordinationId);
   rpc.setException(new RemoteRpcException(failure));
 }