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

Comparing jsr166/src/jsr166e/extra/SequenceLock.java (file contents):
Revision 1.3 by jsr166, Sun Nov 18 18:03:10 2012 UTC vs.
Revision 1.7 by jsr166, Sun Jan 18 20:17:33 2015 UTC

# Line 5 | Line 5
5   */
6  
7   package jsr166e.extra;
8 +
9   import java.util.concurrent.TimeUnit;
10   import java.util.concurrent.TimeoutException;
11   import java.util.concurrent.locks.Lock;
# Line 109 | Line 110 | public class SequenceLock implements Loc
110      private static final long serialVersionUID = 7373984872572414699L;
111  
112      static final class Sync extends AbstractQueuedLongSynchronizer {
113 <        static final long serialVersionUID = 2540673546047039555L;
113 >        private static final long serialVersionUID = 2540673546047039555L;
114  
115          /**
116           * The number of times to spin in lock() and awaitAvailability().
# Line 257 | Line 258 | public class SequenceLock implements Loc
258  
259      /**
260       * Creates an instance of {@code SequenceLock} that will retry
261 <     * attempts to acquire the lock at least the given number times
261 >     * attempts to acquire the lock at least the given number of times
262       * before blocking.
263 +     *
264 +     * @param spins the number of times before blocking
265       */
266      public SequenceLock(int spins) { sync = new Sync(spins); }
267  
# Line 508 | Line 511 | public class SequenceLock implements Loc
511       * Throws UnsupportedOperationException. SequenceLocks
512       * do not support Condition objects.
513       *
514 <     * @throws UnsupportedOperationException
514 >     * @throws UnsupportedOperationException always
515       */
516      public Condition newCondition() {
517          throw new UnsupportedOperationException();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines