code: protected void stopRPC(boolean interruptClientHandlers) throws IOException {
      try {
        // stop avatardatanode server
        stopRPCInternal(server, "avatardatanode", interruptClientHandlers);
        
        // stop namenode rpc (client, datanode)
        super.stopRPC(interruptClientHandlers);
       
        // wait for avatardatanode rpc
        stopWaitRPCInternal(server, "avatardatanode");
      } catch (InterruptedException ex) {
        throw new IOException("stopRPC() interrupted", ex);
      }
    }
docs: Stops all RPC threads and ensures that all RPC handlers have exited.
  Stops all communication to the namenode.