protected boolean release(InternalDistributedMember grantor,String serviceName,boolean lockBatch,int lockId){
  DM dm=getDistributionManager();
  DLockReleaseMessage msg=new DLockReleaseMessage();
  msg.processorId=getProcessorId();
  msg.serviceName=serviceName;
  msg.objectName=this.objectName;
  msg.lockBatch=lockBatch;
  msg.lockId=lockId;
  msg.setRecipient(grantor);
  if (grantor.equals(dm.getId())) {
    msg.setSender(grantor);
    msg.processLocally(dm);
  }
 else {
    dm.putOutgoing(msg);
  }
  try {
    waitForRepliesUninterruptibly();
  }
 catch (  ReplyException e) {
    e.handleAsUnexpected();
  }
  if (this.reply == null)   return false;
  return this.reply.replyCode == DLockReleaseReplyMessage.OK;
}

protected boolean release ( InternalDistributedMember grantor , String serviceName , boolean lockBatch , int lockId ) { DM dm = getDistributionManager ( ) ; DLockReleaseMessage msg = new DLockReleaseMessage ( ) ; msg . processorId = getProcessorId ( ) ; msg . serviceName = serviceName ; msg . objectName = this . objectName ; msg . lockBatch = lockBatch ; msg . lockId = lockId ; msg . setRecipient ( grantor ) ; if ( grantor . equals ( dm . getId ( ) ) ) { msg . setSender ( grantor ) ; msg . processLocally ( dm ) ; } else { dm . putOutgoing ( msg ) ; } try { waitForRepliesUninterruptibly ( ) ; } catch ( ReplyException e ) { e . handleAsUnexpected ( ) ; } if ( this . reply == null ) return false ; return this . reply . replyCode == DLockReleaseReplyMessage . OK ; }
returns true if release was acknowledged by the grantor ; false means we targeted someone who is not the grantor
