public void forceLeader(int timeout){
  long start=System.currentTimeMillis();
  while (!cmember.isLeader()) {
    try {
      cmember.forceLeader();
      if (timeout >= 0 && System.currentTimeMillis() - start > timeout) {
        break;
      }
      Thread.sleep(1000);
    }
 catch (    Exception e) {
      logger.error(e.getMessage(),e);
    }
  }
}

public void forceLeader ( int timeout ) { long start = System . currentTimeMillis ( ) ; while ( ! cmember . isLeader ( ) ) { try { cmember . forceLeader ( ) ; if ( timeout >= 0 && System . currentTimeMillis ( ) - start > timeout ) { break ; } Thread . sleep ( 1000 ) ; } catch ( Exception e ) { logger . error ( e . getMessage ( ) , e ) ; } } }
forces the local member of this shard to become the leader . blocks until this member becomes the leader .
