code: private void handleCommand(MetaCommand cmd) throws IOException {
      if (cmd == null) {
        return;
      }
      switch (cmd) {
        case MetaCommand_Nothing:
          break;
        // Leader master requests re-registration
        case MetaCommand_Register:
          setIdAndRegister();
          break;
        // Unknown request
        case MetaCommand_Unknown:
          LOG.error("Master heartbeat sends unknown command {}", cmd);
          break;
        default:
          throw new RuntimeException("Un-recognized command from leader master " + cmd);
      }
    }
docs: Handles a leader master command.
  
  @param cmd the command to execute