ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/jsr166/jsr166/src/jsr166y/LinkedTransferQueue.java
(Generate patch)

Comparing jsr166/src/jsr166y/LinkedTransferQueue.java (file contents):
Revision 1.35 by jsr166, Thu Jul 30 22:45:39 2009 UTC vs.
Revision 1.38 by jsr166, Fri Jul 31 14:48:18 2009 UTC

# Line 511 | Line 511 | public class LinkedTransferQueue<E> exte
511  
512      /**
513       * Inserts the specified element at the tail of this queue.
514 <     * As the queue is unbounded this method will never throw
514 >     * As the queue is unbounded, this method will never throw
515       * {@link IllegalStateException} or return {@code false}.
516       *
517       * @return {@code true} (as specified by {@link Collection#add})
# Line 524 | Line 524 | public class LinkedTransferQueue<E> exte
524      /**
525       * Transfers the specified element immediately if there exists a
526       * consumer already waiting to receive it (in {@link #take} or
527 <     * timed {@link #poll(Object,long,TimeUnit) poll}), otherwise
527 >     * timed {@link #poll(long,TimeUnit) poll}), otherwise
528       * returning {@code false} without enqueuing the element.
529       *
530       * @throws NullPointerException if the specified element is null
# Line 539 | Line 539 | public class LinkedTransferQueue<E> exte
539       * waiting if necessary for the element to be received by a
540       * consumer invoking {@code take} or {@code poll}.
541       *
542     * @throws InterruptedException {@inheritDoc}
542       * @throws NullPointerException if the specified element is null
543       */
544      public void transfer(E e) throws InterruptedException {
# Line 552 | Line 551 | public class LinkedTransferQueue<E> exte
551  
552      /**
553       * Inserts the specified element at the tail of this queue,
554 <     * waiting up to the specified wait time for the element to be
555 <     * received by a consumer invoking {@code take} or {@code poll}.
554 >     * waiting up to the specified wait time if necessary for the
555 >     * element to be received by a consumer invoking {@code take} or
556 >     * {@code poll}.
557       *
558     * @throws InterruptedException {@inheritDoc}
558       * @throws NullPointerException if the specified element is null
559       */
560      public boolean tryTransfer(E e, long timeout, TimeUnit unit)
# Line 576 | Line 575 | public class LinkedTransferQueue<E> exte
575          throw new InterruptedException();
576      }
577  
579    /**
580     * @throws InterruptedException {@inheritDoc}
581     */
578      public E poll(long timeout, TimeUnit unit) throws InterruptedException {
579          E e = xfer(null, TIMEOUT, unit.toNanos(timeout));
580          if (e != null || !Thread.interrupted())

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines