EDU.oswego.cs.dl.util.concurrent
Class WaitableShort
- Cloneable, Comparable, Executor
public class WaitableShort
WaitableShort(short initialValue) - Make a new WaitableShort with the given initial value,
and using its own internal lock.
|
WaitableShort(short initialValue, Object lock) - Make a new WaitableShort with the given initial value,
and using the supplied lock.
|
short | add(short amount)
|
short | and(short b) - Set value to value & b.
|
boolean | commit(short assumedValue, short newValue)
|
short | complement() - Set the value to its complement
|
short | decrement()
|
short | divide(short factor)
|
short | increment()
|
short | multiply(short factor)
|
short | or(short b) - Set value to value | b.
|
short | set(short newValue)
|
short | subtract(short amount)
|
void | whenEqual(short c, Runnable action) - Wait until value equals c, then run action if nonnull.
|
void | whenGreater(short c, Runnable action) - wait until value greater than c, then run action if nonnull.
|
void | whenGreaterEqual(short c, Runnable action) - wait until value greater than or equal to c, then run action if nonnull.
|
void | whenLess(short c, Runnable action) - wait until value less than c, then run action if nonnull.
|
void | whenLessEqual(short c, Runnable action) - wait until value less than or equal to c, then run action if nonnull.
|
void | whenNotEqual(short c, Runnable action) - wait until value not equal to c, then run action if nonnull.
|
short | xor(short b) - Set value to value ^ b.
|
add , and , commit , compareTo , compareTo , compareTo , complement , decrement , divide , equals , get , hashCode , increment , multiply , negate , or , set , subtract , swap , toString , xor |
WaitableShort
public WaitableShort(short initialValue)
Make a new WaitableShort with the given initial value,
and using its own internal lock.
WaitableShort
public WaitableShort(short initialValue,
Object lock)
Make a new WaitableShort with the given initial value,
and using the supplied lock.
whenEqual
public void whenEqual(short c,
Runnable action)
throws InterruptedException
Wait until value equals c, then run action if nonnull.
The action is run with the synchronization lock held.
whenGreater
public void whenGreater(short c,
Runnable action)
throws InterruptedException
wait until value greater than c, then run action if nonnull.
The action is run with the synchronization lock held.
whenGreaterEqual
public void whenGreaterEqual(short c,
Runnable action)
throws InterruptedException
wait until value greater than or equal to c, then run action if nonnull.
The action is run with the synchronization lock held.
whenLess
public void whenLess(short c,
Runnable action)
throws InterruptedException
wait until value less than c, then run action if nonnull.
The action is run with the synchronization lock held.
whenLessEqual
public void whenLessEqual(short c,
Runnable action)
throws InterruptedException
wait until value less than or equal to c, then run action if nonnull.
The action is run with the synchronization lock held.
whenNotEqual
public void whenNotEqual(short c,
Runnable action)
throws InterruptedException
wait until value not equal to c, then run action if nonnull.
The action is run with the synchronization lock held.