code: private void handleRpcException(RpcException e, int attemptNumber) throws IOException {
          String messageStart;
  
          if (!(e.getStatus().equals(RpcStatus.NETWORK_ERROR))) {
              messageStart = "rpc";
          } else {
              // check whether to retry
              if (attemptNumber + 1 < _maximumRetries) {
                  try {
                      int waitTime = _retryWait * (attemptNumber + 1);
                      Thread.sleep(waitTime);
                  } catch (InterruptedException ie) {
                      // restore the interrupt status
                      Thread.currentThread().interrupt();
                  }
                  LOG.warn("network error happens, server {}, attemptNumber {}", new Object[] { _server, attemptNumber });
                  return;
              }
  
              messageStart = "network";
          }
  
          throw new NfsException(NfsStatus.NFS3ERR_IO,
                  String.format("%s error, server: %s, RPC error: %s", messageStart, _server, e.getMessage()), e);
      }
docs: Decide whether to retry or throw an exception.
  
  @param e
  The exception.
  @param attemptNumber
  The number of attempts so far.
  @throws IOException