public class Mutex extends Object implements SyncInterface
| Constructor and Description |
|---|
Mutex()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
lock()
Lock the Mutex.
|
String |
toString() |
boolean |
tryLock()
Try to lock the Mutex.
|
void |
unlock()
Unlock the Mutex.
|
public void lock()
throws InterruptedException
lock in interface SyncInterfaceInterruptedExceptionpublic boolean tryLock()
tryLock in interface SyncInterfacetrue if Mutex could be lockedpublic void unlock()
unlock in interface SyncInterfaceCopyright © 2014–2016 Tomas Teubner. All rights reserved.