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

Comparing jsr166/src/jsr166e/SequenceLock.java (file contents):
Revision 1.13 by jsr166, Mon Aug 1 12:41:16 2011 UTC vs.
Revision 1.16 by jsr166, Mon Dec 5 04:50:19 2011 UTC

# Line 109 | Line 109 | public class SequenceLock implements Loc
109      private static final long serialVersionUID = 7373984872572414699L;
110  
111      static final class Sync extends AbstractQueuedLongSynchronizer {
112 +        static final long serialVersionUID = 2540673546047039555L;
113 +
114          /**
115           * The number of times to spin in lock() and awaitAvailability().
116           */
# Line 160 | Line 162 | public class SequenceLock implements Loc
162  
163          public final long tryAcquireShared(long unused) {
164              return (((getState() & 1L) == 0L) ? 1L :
165 <                    (getExclusiveOwnerThread() == Thread.currentThread()) ?  0L:
165 >                    (getExclusiveOwnerThread() == Thread.currentThread()) ? 0L:
166                      -1L);
167          }
168  
# Line 306 | Line 308 | public class SequenceLock implements Loc
308       * @param timeout the time to wait for availability
309       * @param unit the time unit of the timeout argument
310       * @return the current sequence number if the lock is available
311 <     *         upon return from this method.
311 >     *         upon return from this method
312       * @throws InterruptedException if the current thread is interrupted
313       * @throws TimeoutException if the lock was not available within
314 <     * the specified waiting time.
314 >     * the specified waiting time
315       * @throws NullPointerException if the time unit is null
316       */
317      public long tryAwaitAvailability(long timeout, TimeUnit unit)
# Line 525 | Line 527 | public class SequenceLock implements Loc
527       * @return the number of holds on this lock by the current thread,
528       *         or zero if this lock is not held by the current thread
529       */
530 <    public long getHoldCount() { return sync.getHoldCount();  }
530 >    public long getHoldCount() { return sync.getHoldCount(); }
531  
532      /**
533       * Queries if this lock is held by the current thread.

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines