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