static void send(String serviceName,InternalDistributedMember oldGrantor,InternalDistributedMember newGrantor,long newGrantorVersion,int newGrantorSerialNumber,DM dm){
  final InternalDistributedMember elder=dm.getId();
  if (elder.equals(oldGrantor)) {
    doOldGrantorWork(serviceName,elder,newGrantor,newGrantorVersion,newGrantorSerialNumber,dm,null);
  }
 else {
    DeposeGrantorProcessor processor=new DeposeGrantorProcessor(dm,oldGrantor);
    DeposeGrantorMessage.send(serviceName,oldGrantor,newGrantor,newGrantorVersion,newGrantorSerialNumber,dm,processor);
    try {
      processor.waitForRepliesUninterruptibly();
    }
 catch (    ReplyException e) {
      e.handleAsUnexpected();
    }
  }
}

static void send ( String serviceName , InternalDistributedMember oldGrantor , InternalDistributedMember newGrantor , long newGrantorVersion , int newGrantorSerialNumber , DM dm ) { final InternalDistributedMember elder = dm . getId ( ) ; if ( elder . equals ( oldGrantor ) ) { doOldGrantorWork ( serviceName , elder , newGrantor , newGrantorVersion , newGrantorSerialNumber , dm , null ) ; } else { DeposeGrantorProcessor processor = new DeposeGrantorProcessor ( dm , oldGrantor ) ; DeposeGrantorMessage . send ( serviceName , oldGrantor , newGrantor , newGrantorVersion , newGrantorSerialNumber , dm , processor ) ; try { processor . waitForRepliesUninterruptibly ( ) ; } catch ( ReplyException e ) { e . handleAsUnexpected ( ) ; } } }
send a message to oldgrantor telling him that he is deposed by newgrantor . send does not complete until an ack is received or the oldgrantor leaves the system .
