/** Generate Queue SingleRemoveSynchronizedAddLock and set add and wait Timeouts */ public FastQueue() { lock = new SingleRemoveSynchronizedAddLock(); lock.setAddWaitTimeout(addWaitTimeout); lock.setRemoveWaitTimeout(removeWaitTimeout); }
/** * set remove wait timeout ( default 30000 msec) * * @param timeout */ public void setRemoveWaitTimeout(long timeout) { removeWaitTimeout = timeout; lock.setRemoveWaitTimeout(removeWaitTimeout); }