Home
last modified time | relevance | path

Searched refs:poll (Results 1 – 25 of 139) sorted by relevance

123456

/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/lang/ref/
DReferenceQueueTest.java70 assertNull(rq.poll()); in test_poll()
76 assertTrue("Remove failed.", ((Boolean) rq.poll().get()) in test_poll()
83 assertEquals("Remove failed.", obj, (rq.poll().get())); in test_poll()
89 assertNull("Remove failed.", rq.poll().get()); in test_poll()
94 assertNull(rq.poll()); in test_poll()
101 assertNull(rq.poll()); in test_poll()
121 assertNull(rq.poll()); in test_remove()
154 assertNull(rq.poll()); in test_remove()
162 assertNull("Queue should be empty. (poll)", rq.poll()); in test_removeJ()
201 assertNull(rq.poll()); in test_removeJ()
[all …]
DReferenceTest.java151 assertTrue("Not properly enqueued.", rq.poll().get() == obj); in test_enqueue()
155 && (rq.poll() == null)); in test_enqueue()
163 assertTrue("Not properly enqueued2.", rq.poll().get() == obj); in test_enqueue()
167 && (rq.poll() == null)); in test_enqueue()
172 assertNull("Not properly enqueued3.", rq.poll().get()); in test_enqueue()
176 && (rq.poll() == null)); in test_enqueue()
197 ref = queue.poll(); in test_get_WeakReference()
307 rq.poll(); in test_isEnqueued()
/libcore/ojluni/src/test/java/util/concurrent/tck/
DExecutorCompletionServiceTest.java134 assertNull(cs.poll()); in testPoll1()
139 while ((f = cs.poll()) == null) { in testPoll1()
154 assertNull(cs.poll()); in testPoll2()
159 while ((f = cs.poll(SHORT_DELAY_MS, MILLISECONDS)) == null) { in testPoll2()
179 assertNull(cs.poll()); in testPollReturnsNull()
180 assertNull(cs.poll(0L, MILLISECONDS)); in testPollReturnsNull()
181 assertNull(cs.poll(Long.MIN_VALUE, MILLISECONDS)); in testPollReturnsNull()
183 assertNull(cs.poll(timeoutMillis(), MILLISECONDS)); in testPollReturnsNull()
215 assertNull(cs.poll()); in testTaskAssortment()
237 assertNull(cs.poll()); in testNewTaskForCallable()
[all …]
DLinkedTransferQueueTest.java146 assertEquals(ints[i], q.poll()); in testConstructor5()
206 assertEquals(ints[i], q.poll()); in testAddAll5()
271 assertEquals(i, (int) q.poll()); in testPoll()
273 assertNull(q.poll()); in testPoll()
283 assertEquals(i, (int) q.poll(0, MILLISECONDS)); in testTimedPoll0()
285 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
296 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
300 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
316 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
319 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
[all …]
DPriorityBlockingQueueTest.java174 assertEquals(ints[i], q.poll()); in testConstructor6()
189 assertEquals(ints[i], q.poll()); in testConstructor7()
244 assertNull(q.poll()); in testOfferNonComparable()
297 assertEquals(ints[i], q.poll()); in testAddAll5()
395 assertEquals(i, q.poll()); in testPoll()
397 assertNull(q.poll()); in testPoll()
406 assertEquals(i, q.poll(0, MILLISECONDS)); in testTimedPoll0()
408 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
418 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
422 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
[all …]
DDelayQueueTest.java209 assertEquals(ints[i], q.poll()); in testConstructor6()
302 assertEquals(ints[i], q.poll()); in testAddAll5()
400 assertEquals(new PDelay(i), q.poll()); in testPoll()
402 assertNull(q.poll()); in testPoll()
411 assertEquals(new PDelay(i), q.poll(0, MILLISECONDS)); in testTimedPoll0()
413 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
423 assertEquals(new PDelay(i), q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
427 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
444 ((PDelay)q.poll(LONG_DELAY_MS, MILLISECONDS))); in testInterruptedTimedPoll()
449 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
[all …]
DPriorityQueueTest.java151 assertEquals(ints[i], q.poll()); in testConstructor6()
166 assertEquals(ints[i], q.poll()); in testConstructor7()
246 assertNull(q.poll()); in testOfferNonComparable()
310 assertEquals(new Integer(i), q.poll());
319 assertEquals(i, q.poll());
321 assertNull(q.poll());
331 assertEquals(i, q.poll());
345 assertEquals(i, q.poll());
395 q.poll();
471 assertSame(o[i], q.poll());
[all …]
DBlockingQueueTest.java230 assertSame(one, q.poll());
246 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPollWithOffer()
251 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
255 q.poll(LONG_DELAY_MS, MILLISECONDS); in testTimedPollWithOffer()
262 q.poll(LONG_DELAY_MS, MILLISECONDS); in testTimedPollWithOffer()
332 q.poll(2 * LONG_DELAY_MS, MILLISECONDS);
354 q.poll(2 * LONG_DELAY_MS, MILLISECONDS);
DLinkedBlockingQueueTest.java166 assertEquals(ints[i], q.poll()); in testConstructor6()
278 assertEquals(ints[i], q.poll()); in testAddAll5()
439 assertEquals(i, q.poll()); in testPoll()
441 assertNull(q.poll()); in testPoll()
450 assertEquals(i, q.poll(0, MILLISECONDS)); in testTimedPoll0()
452 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
462 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
466 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
482 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
486 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
[all …]
/libcore/jsr166-tests/src/test/java/jsr166/
DLinkedTransferQueueTest.java128 assertEquals(ints[i], q.poll()); in testConstructor5()
188 assertEquals(ints[i], q.poll()); in testAddAll5()
253 assertEquals(i, (int) q.poll()); in testPoll()
255 assertNull(q.poll()); in testPoll()
265 assertEquals(i, (int) q.poll(0, MILLISECONDS)); in testTimedPoll0()
267 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
278 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
282 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
298 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
301 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
[all …]
DDelayQueueTest.java201 assertEquals(ints[i], q.poll()); in testConstructor6()
294 assertEquals(ints[i], q.poll()); in testAddAll5()
392 assertEquals(new PDelay(i), q.poll()); in testPoll()
394 assertNull(q.poll()); in testPoll()
403 assertEquals(new PDelay(i), q.poll(0, MILLISECONDS)); in testTimedPoll0()
405 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
415 assertEquals(new PDelay(i), q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
419 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
436 ((PDelay)q.poll(LONG_DELAY_MS, MILLISECONDS))); in testInterruptedTimedPoll()
441 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
[all …]
DPriorityBlockingQueueTest.java144 assertEquals(ints[i], q.poll()); in testConstructor6()
159 assertEquals(ints[i], q.poll()); in testConstructor7()
264 assertEquals(ints[i], q.poll()); in testAddAll5()
362 assertEquals(i, q.poll()); in testPoll()
364 assertNull(q.poll()); in testPoll()
373 assertEquals(i, q.poll(0, MILLISECONDS)); in testTimedPoll0()
375 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
385 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
389 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
405 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
[all …]
DExecutorCompletionServiceTest.java125 assertNull(ecs.poll()); in testPoll1()
131 while ((f = ecs.poll()) == null) { in testPoll1()
148 assertNull(ecs.poll()); in testPoll2()
151 Future f = ecs.poll(SHORT_DELAY_MS, MILLISECONDS); in testPoll2()
177 assertNull(ecs.poll()); in testNewTaskForCallable()
208 assertNull(ecs.poll()); in testNewTaskForRunnable()
DArrayBlockingQueueTest.java147 assertEquals(ints[i], q.poll()); in testConstructor7()
258 assertEquals(ints[i], q.poll()); in testAddAll5()
419 assertEquals(i, q.poll()); in testPoll()
421 assertNull(q.poll()); in testPoll()
430 assertEquals(i, q.poll(0, MILLISECONDS)); in testTimedPoll0()
432 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
443 assertEquals(i, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
447 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
463 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
467 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
[all …]
DBlockingQueueTest.java206 assertSame(one, q.poll());
222 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPollWithOffer()
227 assertSame(zero, q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPollWithOffer()
231 q.poll(LONG_DELAY_MS, MILLISECONDS); in testTimedPollWithOffer()
238 q.poll(LONG_DELAY_MS, MILLISECONDS); in testTimedPollWithOffer()
308 q.poll(2 * LONG_DELAY_MS, MILLISECONDS);
330 q.poll(2 * LONG_DELAY_MS, MILLISECONDS);
DLinkedBlockingQueueTest.java136 assertEquals(ints[i], q.poll()); in testConstructor6()
248 assertEquals(ints[i], q.poll()); in testAddAll5()
409 assertEquals(i, q.poll()); in testPoll()
411 assertNull(q.poll()); in testPoll()
420 assertEquals(i, q.poll(0, MILLISECONDS)); in testTimedPoll0()
422 assertNull(q.poll(0, MILLISECONDS)); in testTimedPoll0()
432 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testTimedPoll()
436 assertNull(q.poll(timeoutMillis(), MILLISECONDS)); in testTimedPoll()
452 assertEquals(i, (int) q.poll(LONG_DELAY_MS, MILLISECONDS)); in testInterruptedTimedPoll()
456 q.poll(LONG_DELAY_MS, MILLISECONDS); in testInterruptedTimedPoll()
[all …]
DPriorityQueueTest.java114 assertEquals(ints[i], q.poll()); in testConstructor6()
129 assertEquals(ints[i], q.poll()); in testConstructor7()
264 assertEquals(Integer.valueOf(i), q.poll()); in testAddAll5()
273 assertEquals(i, q.poll()); in testPoll()
275 assertNull(q.poll()); in testPoll()
285 assertEquals(i, q.poll()); in testPeek()
299 assertEquals(i, q.poll()); in testElement()
349 q.poll(); in testContains()
425 assertSame(o[i], q.poll()); in testToArray()
438 assertSame(ints[i], q.poll()); in testToArray2()
/libcore/ojluni/src/main/java/sun/nio/fs/
DAbstractWatchService.java96 public final WatchKey poll() { in poll() method in AbstractWatchService
98 WatchKey key = pendingKeys.poll(); in poll()
104 public final WatchKey poll(long timeout, TimeUnit unit) in poll() method in AbstractWatchService
108 WatchKey key = pendingKeys.poll(timeout, unit); in poll()
/libcore/luni/src/test/java/libcore/java/nio/file/
DWatchServiceTest.java88 WatchKey watchKey = watchService.poll(2, TimeUnit.SECONDS); in checkWatchServiceEventMultipleKeys()
134 assertNull(watchService.poll()); in test_singleFile()
146 WatchKey doubleModifyKey = watchService.poll(); in test_singleFile()
152 assertNull(watchService.poll()); in test_singleFile()
160 assertNull(watchService.poll()); in test_singleFile()
183 assertNull(watchService.poll()); in test_EventMask()
210 assertNull(watchService.poll()); in test_singleDirectory()
242 assertNull(watchService.poll()); in test_cancel()
272 assertNull(watchService.poll()); in test_removeTarget()
312 assertNull(watchService1.poll()); in test_multipleKeys()
[all …]
/libcore/ojluni/src/main/java/java/util/concurrent/
DExecutorCompletionService.java203 public Future<V> poll() { in poll() method in ExecutorCompletionService
204 return completionQueue.poll(); in poll()
207 public Future<V> poll(long timeout, TimeUnit unit) in poll() method in ExecutorCompletionService
209 return completionQueue.poll(timeout, unit); in poll()
DCompletionService.java109 Future<V> poll(); in poll() method
125 Future<V> poll(long timeout, TimeUnit unit) throws InterruptedException; in poll() method
DDelayQueue.java190 public E poll() { in poll() method in DelayQueue
197 : q.poll(); in poll()
221 return q.poll(); in take()
254 public E poll(long timeout, TimeUnit unit) throws InterruptedException { in poll() method in DelayQueue
269 return q.poll(); in poll()
356 q.poll(); in drainTo()
/libcore/ojluni/src/main/java/java/nio/file/
DWatchService.java139 WatchKey poll(); in poll() method
159 WatchKey poll(long timeout, TimeUnit unit) in poll() method
/libcore/ojluni/src/main/java/java/util/
DAbstractQueue.java113 E x = poll(); in remove()
147 while (poll() != null) in clear()
/libcore/harmony-tests/src/test/java/org/apache/harmony/tests/java/util/
DPriorityQueueTest.java140 assertEquals(newArray[i], integerQueue.poll()); in test_iterator_remove()
281 assertEquals(array[i], integerQueue.poll()); in test_ConstructorLjava_util_Colleciton()
330 assertEquals(queue.poll(), constructedQueue.poll()); in test_ConstructorLjava_util_Colleciton_from_priorityqueue()
349 assertEquals(iter.next(), queue.poll()); in test_ConstructorLjava_util_Colleciton_from_sortedset()
370 assertEquals(array[i], objectQueue.poll()); in test_ConstructorLjava_util_PriorityQueue()
399 assertEquals(iter.next(), queue.poll()); in test_ConstructorLjava_util_SortedSet()
427 assertEquals(sortedArray[i], queue.poll()); in test_offerLjava_lang_Object()
430 assertNull(queue.poll()); in test_offerLjava_lang_Object()
480 assertEquals(array[i], stringQueue.poll()); in test_poll()
483 assertNull(stringQueue.poll()); in test_poll()
[all …]

123456