--- jsr166/src/jsr166e/extra/SequenceLock.java 2012/10/21 06:14:11 1.2 +++ jsr166/src/jsr166e/extra/SequenceLock.java 2015/01/18 20:17:33 1.7 @@ -5,6 +5,7 @@ */ package jsr166e.extra; + import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeoutException; import java.util.concurrent.locks.Lock; @@ -40,7 +41,7 @@ import java.io.IOException; * threads invoke short read-only methods much more frequently than * fully locked methods. * - *

Methods {@code awaitAvailability} and {@code getSequence} can + *

Methods {@code awaitAvailability} and {@code getSequence} can * be used together to define (partially) optimistic read-only methods * that are usually more efficient than ReadWriteLocks when they * apply. These methods should in general be structured as loops that @@ -109,7 +110,7 @@ public class SequenceLock implements Loc private static final long serialVersionUID = 7373984872572414699L; static final class Sync extends AbstractQueuedLongSynchronizer { - static final long serialVersionUID = 2540673546047039555L; + private static final long serialVersionUID = 2540673546047039555L; /** * The number of times to spin in lock() and awaitAvailability(). @@ -257,8 +258,10 @@ public class SequenceLock implements Loc /** * Creates an instance of {@code SequenceLock} that will retry - * attempts to acquire the lock at least the given number times + * attempts to acquire the lock at least the given number of times * before blocking. + * + * @param spins the number of times before blocking */ public SequenceLock(int spins) { sync = new Sync(spins); } @@ -508,7 +511,7 @@ public class SequenceLock implements Loc * Throws UnsupportedOperationException. SequenceLocks * do not support Condition objects. * - * @throws UnsupportedOperationException + * @throws UnsupportedOperationException always */ public Condition newCondition() { throw new UnsupportedOperationException();