synchronized void add(Request req, boolean at_head, boolean unsuspend) { if(suspended && !unsuspend) { log.warn("queue is suspended; request " + req + " is discarded"); return; } start(unsuspend); try { if(at_head) q.addAtHead(req); else q.add(req); history.add(new Date() + ": " + req.toString()); } catch(QueueClosedException e) { if(trace) log.trace("queue is closed; request " + req + " is discarded"); }
void add(Request req) { add(req, false, false);
        synchronized void add(Request req, boolean at_head, boolean unsuspend) {            if(suspended && !unsuspend) {                log.warn("queue is suspended; request " + req + " is discarded");                return;            }            start(unsuspend);            try {                if(at_head)                    q.addAtHead(req);                else                    q.add(req);                history.add(new Date() + ": " + req.toString());            }            catch(QueueClosedException e) {                if(trace)                    log.trace("queue is closed; request " + req + " is discarded");            }        }