private String sendStatusRequestWithRetry(ModifiableSolrParams params,int maxCounter) throws SolrServerException, IOException {
  String message=null;
  while (maxCounter-- > 0) {
    final NamedList r=sendRequest(params);
    final NamedList status=(NamedList)r.get("status");
    final RequestStatusState state=RequestStatusState.fromKey((String)status.get("state"));
    message=(String)status.get("msg");
    if (state == RequestStatusState.COMPLETED || state == RequestStatusState.FAILED) {
      return message;
    }
    try {
      Thread.sleep(1000);
    }
 catch (    InterruptedException e) {
    }
  }
  return message;
}

private String sendStatusRequestWithRetry ( ModifiableSolrParams params , int maxCounter ) throws SolrServerException , IOException { String message = null ; while ( maxCounter -- > 0 ) { final NamedList r = sendRequest ( params ) ; final NamedList status = ( NamedList ) r . get ( "status" ) ; final RequestStatusState state = RequestStatusState . fromKey ( ( String ) status . get ( "state" ) ) ; message = ( String ) status . get ( "msg" ) ; if ( state == RequestStatusState . COMPLETED || state == RequestStatusState . FAILED ) { return message ; } try { Thread . sleep ( 1000 ) ; } catch ( InterruptedException e ) { } } return message ; }
helper method to send a status request with specific retry limit and return the message / null from the success response .
