public void add(E newValue){ queueLock.lock(); try { while (queue is full) wait for more space . . . } finally { queueLock.unlock(); }}