Searched refs:drainTo (Results 1 - 18 of 18) sorted by relevance

/libcore/luni/src/main/java/java/util/concurrent/
H A DBlockingQueue.java322 int drainTo(Collection<? super E> c); method in interface:BlockingQueue
347 int drainTo(Collection<? super E> c, int maxElements); method in interface:BlockingQueue
H A DDelayQueue.java297 * Used only by drainTo. Call only when holding lock.
312 public int drainTo(Collection<? super E> c) { method in class:DelayQueue
338 public int drainTo(Collection<? super E> c, int maxElements) { method in class:DelayQueue
H A DArrayBlockingQueue.java626 public int drainTo(Collection<? super E> c) { method in class:ArrayBlockingQueue
627 return drainTo(c, Integer.MAX_VALUE);
636 public int drainTo(Collection<? super E> c, int maxElements) { method in class:ArrayBlockingQueue
H A DLinkedBlockingQueue.java664 public int drainTo(Collection<? super E> c) { method in class:LinkedBlockingQueue
665 return drainTo(c, Integer.MAX_VALUE);
674 public int drainTo(Collection<? super E> c, int maxElements) { method in class:LinkedBlockingQueue
H A DPriorityBlockingQueue.java44 * {@code Arrays.sort(pq.toArray())}. Also, method {@code drainTo}
691 public int drainTo(Collection<? super E> c) { method in class:PriorityBlockingQueue
692 return drainTo(c, Integer.MAX_VALUE);
701 public int drainTo(Collection<? super E> c, int maxElements) { method in class:PriorityBlockingQueue
H A DScheduledThreadPoolExecutor.java1179 * Used only by drainTo. Call only when holding lock.
1188 public int drainTo(Collection<? super Runnable> c) { method in class:ScheduledThreadPoolExecutor.DelayedWorkQueue
1209 public int drainTo(Collection<? super Runnable> c, int maxElements) { method in class:ScheduledThreadPoolExecutor.DelayedWorkQueue
H A DSynchronousQueue.java1085 public int drainTo(Collection<? super E> c) { method in class:SynchronousQueue
1104 public int drainTo(Collection<? super E> c, int maxElements) { method in class:SynchronousQueue
H A DLinkedBlockingDeque.java703 public int drainTo(Collection<? super E> c) { method in class:LinkedBlockingDeque
704 return drainTo(c, Integer.MAX_VALUE);
713 public int drainTo(Collection<? super E> c, int maxElements) { method in class:LinkedBlockingDeque
H A DLinkedTransferQueue.java1341 public int drainTo(Collection<? super E> c) { method in class:LinkedTransferQueue
1358 public int drainTo(Collection<? super E> c, int maxElements) { method in class:LinkedTransferQueue
H A DThreadPoolExecutor.java838 * drainTo. But if the queue is a DelayQueue or any other kind of
839 * queue for which poll or drainTo may fail to remove some
845 q.drainTo(taskList);
/libcore/jsr166-tests/src/test/java/jsr166/
H A DBlockingQueueTest.java147 * drainTo(null) throws NullPointerException
152 q.drainTo(null);
158 * drainTo(this) throws IllegalArgumentException
163 q.drainTo(q);
169 * drainTo(null, n) throws NullPointerException
174 q.drainTo(null, 0);
180 * drainTo(this, n) throws IllegalArgumentException
185 q.drainTo(q, 0);
191 * drainTo(c, n) returns 0 and does nothing when n <= 0
197 assertEquals(0, q.drainTo(ne
[all...]
H A DPriorityBlockingQueueTest.java667 * drainTo(c) empties queue into another collection c
672 q.drainTo(l);
683 q.drainTo(l);
691 * drainTo empties queue
702 q.drainTo(l);
711 * drainTo(c, n) empties first min(n, size) elements of queue into c
719 q.drainTo(l, i);
H A DSynchronousQueueTest.java548 * drainTo(c) of empty queue doesn't transfer elements
555 q.drainTo(l);
561 * drainTo empties queue, unblocking a waiting put.
575 q.drainTo(l);
586 * drainTo(c, n) empties up to n elements of queue into c
602 while ((drained = q.drainTo(l, 1)) == 0) Thread.yield();
605 while ((drained = q.drainTo(l, 1)) == 0) Thread.yield();
H A DArrayBlockingQueueTest.java859 * drainTo(c) empties queue into another collection c
864 q.drainTo(l);
875 q.drainTo(l);
883 * drainTo empties full queue, unblocking a waiting put.
894 q.drainTo(l);
903 * drainTo(c, n) empties first min(n, size) elements of queue into c
911 q.drainTo(l, i);
H A DDelayQueueTest.java741 * drainTo(c) empties queue into another collection c
751 q.drainTo(l);
761 q.drainTo(l);
769 * drainTo empties queue
780 q.drainTo(l);
787 * drainTo(c, n) empties first min(n, size) elements of queue into c
793 q.drainTo(l, i);
H A DLinkedBlockingQueueTest.java792 * drainTo(c) empties queue into another collection c
797 q.drainTo(l);
808 q.drainTo(l);
816 * drainTo empties full queue, unblocking a waiting put.
827 q.drainTo(l);
836 * drainTo(c, n) empties first min(n, size) elements of queue into c
844 q.drainTo(l, i);
H A DLinkedTransferQueueTest.java669 * drainTo(c) empties queue into another collection c
674 q.drainTo(l);
686 q.drainTo(l);
695 * drainTo(c) empties full queue, unblocking a waiting put.
704 q.drainTo(l);
713 * drainTo(c, n) empties first min(n, size) elements of queue into c
722 q.drainTo(l, i);
H A DLinkedBlockingDequeTest.java1746 * drainTo(c) empties deque into another collection c
1751 q.drainTo(l);
1762 q.drainTo(l);
1770 * drainTo empties full deque, unblocking a waiting put.
1781 q.drainTo(l);
1790 * drainTo(c, n) empties first min(n, size) elements of queue into c
1798 q.drainTo(l, i);

Completed in 125 milliseconds