cgl.hpsearch.common.sync
Class Lock
java.lang.Object
cgl.hpsearch.common.sync.Lock
- public class Lock
- extends Object
Implementation of a Lock that locks up a thread until its awoken using
signal() Created on Mar 14, 2005
- Author:
- Harshawardhan Gadgil (hgadgil@grids.ucs.indiana.edu)
|
Constructor Summary |
Lock()
|
|
Method Summary |
void |
lock()
Locks the current thread |
static void |
main(String[] a)
Testing purposes only |
void |
sleep(long timeout)
|
void |
unlock()
Unlocks the locked thread |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOCKED
public static final int LOCKED
- See Also:
- Constant Field Values
UNLOCKED
public static final int UNLOCKED
- See Also:
- Constant Field Values
Lock
public Lock()
lock
public void lock()
- Locks the current thread
sleep
public void sleep(long timeout)
unlock
public void unlock()
- Unlocks the locked thread
main
public static void main(String[] a)
- Testing purposes only
- Parameters:
a -