private void offer(BlockingQueue<Task> queue,Task task) throws QueueTimeoutException {
  try {
    debug("Queuing Task {0}",task.toString());
    if (!queue.offer(wrap(task),configuration.getQueueTimeout(),TimeUnit.SECONDS)) {
      throw new QueueTimeoutException(task);
    }
  }
 catch (  InterruptedException e) {
    throw new QueueTimeoutException(task,e);
  }
}

private void offer ( BlockingQueue < Task > queue , Task task ) throws QueueTimeoutException { try { debug ( "Queuing Task {0}" , task . toString ( ) ) ; if ( ! queue . offer ( wrap ( task ) , configuration . getQueueTimeout ( ) , TimeUnit . SECONDS ) ) { throw new QueueTimeoutException ( task ) ; } } catch ( InterruptedException e ) { throw new QueueTimeoutException ( task , e ) ; } }
assign the task to the queue with a known timeout .
