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.2 by jsr166, Sun Oct 21 06:14:11 2012 UTC vs.
Revision 1.6 by jsr166, Sun Jul 21 06:24:09 2013 UTC

# Line 40 | Line 40 | import java.io.IOException;
40   * threads invoke short read-only methods much more frequently than
41   * fully locked methods.
42   *
43 < * <p> Methods {@code awaitAvailability} and {@code getSequence} can
43 > * <p>Methods {@code awaitAvailability} and {@code getSequence} can
44   * be used together to define (partially) optimistic read-only methods
45   * that are usually more efficient than ReadWriteLocks when they
46   * apply.  These methods should in general be structured as loops that
# 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;
112 >        private static final long serialVersionUID = 2540673546047039555L;
113  
114          /**
115           * The number of times to spin in lock() and awaitAvailability().
# Line 257 | Line 257 | public class SequenceLock implements Loc
257  
258      /**
259       * Creates an instance of {@code SequenceLock} that will retry
260 <     * attempts to acquire the lock at least the given number times
260 >     * attempts to acquire the lock at least the given number of times
261       * before blocking.
262 +     *
263 +     * @param spins the number of times before blocking
264       */
265      public SequenceLock(int spins) { sync = new Sync(spins); }
266  
# Line 508 | Line 510 | public class SequenceLock implements Loc
510       * Throws UnsupportedOperationException. SequenceLocks
511       * do not support Condition objects.
512       *
513 <     * @throws UnsupportedOperationException
513 >     * @throws UnsupportedOperationException always
514       */
515      public Condition newCondition() {
516          throw new UnsupportedOperationException();

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines