| java.lang.Object EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable EDU.oswego.cs.dl.util.concurrent.SynchronizedInt EDU.oswego.cs.dl.util.concurrent.WaitableInt
Constructor Summary | |
public | WaitableInt(int initialValue) Make a new WaitableInt with the given initial value,
and using its own internal lock. | public | WaitableInt(int initialValue, Object lock) Make a new WaitableInt with the given initial value,
and using the supplied lock. |
Method Summary | |
public int | add(int amount) | public boolean | commit(int assumedValue, int newValue) | public int | decrement() | public int | divide(int factor) | public int | increment() | public int | multiply(int factor) | public int | set(int newValue) | public int | subtract(int amount) | public void | whenEqual(int c, Runnable action) Wait until value equals c, then run action if nonnull. | public void | whenGreater(int c, Runnable action) wait until value greater than c, then run action if nonnull. | public void | whenGreaterEqual(int c, Runnable action) wait until value greater than or equal to c, then run action if nonnull. | public void | whenLess(int c, Runnable action) wait until value less than c, then run action if nonnull. | public void | whenLessEqual(int c, Runnable action) wait until value less than or equal to c, then run action if nonnull. | public void | whenNotEqual(int c, Runnable action) wait until value not equal to c, then run action if nonnull. |
WaitableInt | public WaitableInt(int initialValue)(Code) | | Make a new WaitableInt with the given initial value,
and using its own internal lock.
|
WaitableInt | public WaitableInt(int initialValue, Object lock)(Code) | | Make a new WaitableInt with the given initial value,
and using the supplied lock.
|
add | public int add(int amount)(Code) | | |
commit | public boolean commit(int assumedValue, int newValue)(Code) | | |
decrement | public int decrement()(Code) | | |
divide | public int divide(int factor)(Code) | | |
increment | public int increment()(Code) | | |
multiply | public int multiply(int factor)(Code) | | |
set | public int set(int newValue)(Code) | | |
subtract | public int subtract(int amount)(Code) | | |
whenEqual | public void whenEqual(int c, Runnable action) throws InterruptedException(Code) | | Wait until value equals c, then run action if nonnull.
The action is run with the synchronization lock held.
|
whenGreater | public void whenGreater(int c, Runnable action) throws InterruptedException(Code) | | wait until value greater than c, then run action if nonnull.
The action is run with the synchronization lock held.
|
whenGreaterEqual | public void whenGreaterEqual(int c, Runnable action) throws InterruptedException(Code) | | 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(int c, Runnable action) throws InterruptedException(Code) | | wait until value less than c, then run action if nonnull.
The action is run with the synchronization lock held.
|
whenLessEqual | public void whenLessEqual(int c, Runnable action) throws InterruptedException(Code) | | 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(int c, Runnable action) throws InterruptedException(Code) | | wait until value not equal to c, then run action if nonnull.
The action is run with the synchronization lock held.
|
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedInt | protected int value_(Code)(Java Doc)
|
Fields inherited from EDU.oswego.cs.dl.util.concurrent.SynchronizedVariable | final protected Object lock_(Code)(Java Doc)
|
|
|