Home » concurrent-sources » EDU.oswego.cs.dl.util.concurrent » [javadoc | source]
EDU.oswego.cs.dl.util.concurrent
public class: WaitableByte [javadoc | source]
java.lang.Object
   EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable
      EDU.oswego.cs.dl.util.concurrent.SynchronizedByte
         EDU.oswego.cs.dl.util.concurrent.WaitableByte

All Implemented Interfaces:
    Cloneable, Comparable, Executor

A class useful for offloading waiting and signalling operations on single byte variables.

[ Introduction to this package. ]
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedByte:
value_
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
lock_
Constructor:
 public WaitableByte(byte initialValue) 
 public WaitableByte(byte initialValue,
    Object lock) 
    Make a new WaitableByte with the given initial value, and using the supplied lock. *
Method from EDU.oswego.cs.dl.util.concurrent.WaitableByte Summary:
add,   and,   commit,   complement,   decrement,   divide,   increment,   multiply,   or,   set,   subtract,   whenEqual,   whenGreater,   whenGreaterEqual,   whenLess,   whenLessEqual,   whenNotEqual,   xor
Methods from EDU.oswego.cs.dl.util.concurrent.SynchronizedByte:
add,   and,   commit,   compareTo,   compareTo,   compareTo,   complement,   decrement,   divide,   equals,   get,   hashCode,   increment,   multiply,   negate,   or,   set,   subtract,   swap,   toString,   xor
Methods from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
execute,   getLock
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from EDU.oswego.cs.dl.util.concurrent.WaitableByte Detail:
 public byte add(byte amount) 
 public byte and(byte b) 
    Set value to value & b.
 public boolean commit(byte assumedValue,
    byte newValue) 
 public byte complement() 
    Set the value to its complement
 public byte decrement() 
 public byte divide(byte factor) 
 public byte increment() 
 public byte multiply(byte factor) 
 public byte or(byte b) 
    Set value to value | b.
 public byte set(byte newValue) 
 public byte subtract(byte amount) 
 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. *
 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. *
 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. *
 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. *
 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. *
 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. *
 public byte xor(byte b) 
    Set value to value ^ b.