EDU.oswego.cs.dl.util.concurrent
Class WaitableByte
- Cloneable, Comparable, Executor
public class WaitableByte
WaitableByte(byte initialValue) - Make a new WaitableByte with the given initial value,
and using its own internal lock.
|
WaitableByte(byte initialValue, Object lock) - Make a new WaitableByte with the given initial value,
and using the supplied lock.
|
byte | add(byte amount)
|
byte | and(byte b) - Set value to value & b.
|
boolean | commit(byte assumedValue, byte newValue)
|
byte | complement() - Set the value to its complement
|
byte | decrement()
|
byte | divide(byte factor)
|
byte | increment()
|
byte | multiply(byte factor)
|
byte | or(byte b) - Set value to value | b.
|
byte | set(byte newValue)
|
byte | subtract(byte amount)
|
void | whenEqual(byte c, Runnable action) - Wait until value equals c, then run action if nonnull.
|
void | whenGreater(byte c, Runnable action) - wait until value greater than c, then run action if nonnull.
|
void | whenGreaterEqual(byte c, Runnable action) - wait until value greater than or equal to c, then run action if nonnull.
|
void | whenLess(byte c, Runnable action) - wait until value less than c, then run action if nonnull.
|
void | whenLessEqual(byte c, Runnable action) - wait until value less than or equal to c, then run action if nonnull.
|
void | whenNotEqual(byte c, Runnable action) - wait until value not equal to c, then run action if nonnull.
|
byte | xor(byte 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 |
WaitableByte
public WaitableByte(byte initialValue)
Make a new WaitableByte with the given initial value,
and using its own internal lock.
WaitableByte
public WaitableByte(byte initialValue,
Object lock)
Make a new WaitableByte with the given initial value,
and using the supplied lock.
whenEqual
public void whenEqual(byte 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(byte 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(byte 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(byte 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(byte 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(byte 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.