static boolean recoverLockGrantor(Set members,DLockService service,DLockGrantor newGrantor,DM dm,InternalDistributedMember elder){
  DLockRecoverGrantorProcessor processor=new DLockRecoverGrantorProcessor(dm,members,newGrantor);
  DLockRecoverGrantorMessage msg=new DLockRecoverGrantorMessage();
  msg.serviceName=service.getName();
  msg.processorId=processor.getProcessorId();
  msg.grantorVersion=newGrantor.getVersionId();
  msg.grantorSerialNumber=service.getSerialNumber();
  msg.elder=elder;
  Set recipients=new HashSet(members);
  recipients.remove(dm.getId());
  if (!recipients.isEmpty()) {
    msg.setRecipients(recipients);
    dm.putOutgoing(msg);
  }
  if (msg.getSender() == null)   msg.setSender(dm.getId());
  msg.scheduleMessage(dm);
  try {
    processor.waitForRepliesUninterruptibly();
  }
 catch (  ReplyException e) {
    e.handleAsUnexpected();
  }
  if (processor.error) {
    return false;
  }
  return true;
}

static boolean recoverLockGrantor ( Set members , DLockService service , DLockGrantor newGrantor , DM dm , InternalDistributedMember elder ) { DLockRecoverGrantorProcessor processor = new DLockRecoverGrantorProcessor ( dm , members , newGrantor ) ; DLockRecoverGrantorMessage msg = new DLockRecoverGrantorMessage ( ) ; msg . serviceName = service . getName ( ) ; msg . processorId = processor . getProcessorId ( ) ; msg . grantorVersion = newGrantor . getVersionId ( ) ; msg . grantorSerialNumber = service . getSerialNumber ( ) ; msg . elder = elder ; Set recipients = new HashSet ( members ) ; recipients . remove ( dm . getId ( ) ) ; if ( ! recipients . isEmpty ( ) ) { msg . setRecipients ( recipients ) ; dm . putOutgoing ( msg ) ; } if ( msg . getSender ( ) == null ) msg . setSender ( dm . getId ( ) ) ; msg . scheduleMessage ( dm ) ; try { processor . waitForRepliesUninterruptibly ( ) ; } catch ( ReplyException e ) { e . handleAsUnexpected ( ) ; } if ( processor . error ) { return false ; } return true ; }
sends dlockrecovergrantormessage to all participants of the dlockservice in order to recover from the loss of the previous lock grantor . each member will reply with details on currently held locks , pending locks , and known stuck locks . < p > this method should block until transfer of lock grantor has completed .
