Lines Matching refs:queue
72 * @param elements the elements that the queue should contain, in order
80 ConcurrentLinkedQueue<E> queue = new ConcurrentLinkedQueue<E>();
81 Iterables.addAll(queue, elements);
82 return queue;
101 * @param capacity the capacity of this queue
112 * @param elements the elements that the queue should contain, in order
119 LinkedBlockingQueue<E> queue = new LinkedBlockingQueue<E>();
120 Iterables.addAll(queue, elements);
121 return queue;
140 * @param elements the elements that the queue should contain, in order
148 PriorityBlockingQueue<E> queue = new PriorityBlockingQueue<E>();
149 Iterables.addAll(queue, elements);
150 return queue;
167 * @param elements the elements that the queue should contain, in order
174 PriorityQueue<E> queue = new PriorityQueue<E>();
175 Iterables.addAll(queue, elements);
176 return queue;
191 * Drains the queue as {@link BlockingQueue#drainTo(Collection, int)}, but if the requested
195 * @param q the blocking queue to be drained
209 * the timeout arbitrarily inaccurate, given a queue that is slow to drain).
230 * Drains the queue as {@linkplain #drain(BlockingQueue, Collection, int, long, TimeUnit)},
235 * @param q the blocking queue to be drained