public void enqueue (AbstractQueue<QueueElement> queue, QueueElement qe) 
            throws InterruptedException, TimeoutException {
        Object[] params = new Object[2];
        params[0] = queue;
        params[1] = qe;
        logger.entering(loggerName, "enqueue", params);
        
        boolean bQStatus = false;
        int retries = QRETRIES;
        while (!(bQStatus = queue.offer(qe)) && retries-- > 0)
            Thread.currentThread().sleep(1000);
        if (!bQStatus) {
            logger.warning("Could not queue element.");
            throw new TimeoutException("Could not queue element.");
        } else if ((QRETRIES - retries) > 0) {
            logger.finest("Document queued after " + (QRETRIES - retries) + " retries.");
        }
        
        logger.exiting(loggerName, "enqueue");
    }