protected void prepareRetransmission(final Exchange exchange,final RetransmissionTask task){
  if (executor.isShutdown()) {
    LOGGER.info("Endpoint is being destroyed: skipping retransmission");
    return;
  }
  int timeout;
  if (exchange.getFailedTransmissionCount() == 0) {
    timeout=getRandomTimeout(ack_timeout,(int)(ack_timeout * ack_random_factor));
  }
 else {
    timeout=(int)(ack_timeout_scale * exchange.getCurrentTimeout());
  }
  exchange.setCurrentTimeout(timeout);
  ScheduledFuture<?> f=executor.schedule(task,timeout,TimeUnit.MILLISECONDS);
  exchange.setRetransmissionHandle(f);
}

protected void prepareRetransmission ( final Exchange exchange , final RetransmissionTask task ) { if ( executor . isShutdown ( ) ) { LOGGER . info ( "Endpoint is being destroyed: skipping retransmission" ) ; return ; } int timeout ; if ( exchange . getFailedTransmissionCount ( ) == 0 ) { timeout = getRandomTimeout ( ack_timeout , ( int ) ( ack_timeout * ack_random_factor ) ) ; } else { timeout = ( int ) ( ack_timeout_scale * exchange . getCurrentTimeout ( ) ) ; } exchange . setCurrentTimeout ( timeout ) ; ScheduledFuture < ? > f = executor . schedule ( task , timeout , TimeUnit . MILLISECONDS ) ; exchange . setRetransmissionHandle ( f ) ; }
computes the back - off timer and schedules the specified retransmission task .
