| java.lang.Object org.rapla.components.util.Mutex
Mutex | public class Mutex (Code) | | Mutex-lock for synchronization in multithreaded enviroments.
|
Method Summary | |
final public synchronized void | aquire() tries to aquire a lock. | final public synchronized boolean | aquire(int time) Tries to aquire a lock for the specified time and returns false, if the lock can't be aquired in that time. | protected String | getLoggingPrefix() | protected void | log(String message) | final public synchronized void | release() Releases a lock. |
debugging | boolean debugging(Code) | | |
aquire | final public synchronized void aquire() throws InterruptedException(Code) | | tries to aquire a lock. If the lock is hold by another thread, the current thread will
wait until the lock is released.
|
aquire | final public synchronized boolean aquire(int time) throws InterruptedException(Code) | | Tries to aquire a lock for the specified time and returns false, if the lock can't be aquired in that time.
|
release | final public synchronized void release()(Code) | | Releases a lock. All threads that are waiting for the lock gets notified, but only one can
continue executing the aquire method (because its synchronized) and get the new lock.
|
|
|