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

All Implemented Interfaces:
    Cloneable, Comparable, Executor

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

[ Introduction to this package. ]
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedShort:
value_
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable:
lock_
Constructor:
 public WaitableShort(short initialValue) 
 public WaitableShort(short initialValue,
    Object lock) 
    Make a new WaitableShort with the given initial value, and using the supplied lock. *
Method from EDU.oswego.cs.dl.util.concurrent.WaitableShort 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.SynchronizedShort:
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.WaitableShort Detail:
 public short add(short amount) 
 public short and(short b) 
    Set value to value & b.
 public boolean commit(short assumedValue,
    short newValue) 
 public short complement() 
    Set the value to its complement
 public short decrement() 
 public short divide(short factor) 
 public short increment() 
 public short multiply(short factor) 
 public short or(short b) 
    Set value to value | b.
 public short set(short newValue) 
 public short subtract(short amount) 
 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. *
 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. *
 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. *
 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. *
 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. *
 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. *
 public short xor(short b) 
    Set value to value ^ b.