synchronized void sendRoleRequest(OFControllerRole role,long xid) throws IOException {
  Boolean supportsNxRole=(Boolean)sw.getAttribute(IOFSwitch.SWITCH_SUPPORTS_NX_ROLE);
  if ((supportsNxRole != null) && !supportsNxRole) {
    setSwitchRole(role,RoleRecvStatus.UNSUPPORTED);
  }
 else {
    pendingXid=sendNiciraRoleRequest(role,xid);
    pendingRole=role;
    this.roleSubmitTimeNs=System.nanoTime();
    requestPending=true;
  }
}

synchronized void sendRoleRequest ( OFControllerRole role , long xid ) throws IOException { Boolean supportsNxRole = ( Boolean ) sw . getAttribute ( IOFSwitch . SWITCH_SUPPORTS_NX_ROLE ) ; if ( ( supportsNxRole != null ) && ! supportsNxRole ) { setSwitchRole ( role , RoleRecvStatus . UNSUPPORTED ) ; } else { pendingXid = sendNiciraRoleRequest ( role , xid ) ; pendingRole = role ; this . roleSubmitTimeNs = System . nanoTime ( ) ; requestPending = true ; } }
send a role request with the given role to the switch . send a role request with the given role to the switch and update the pending request and timestamp .
