public class JvmReentrantLock extends java.lang.Object implements ReentrantLock
ReentrantLock for JVM environments| Constructor and Description |
|---|
JvmReentrantLock() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
isHeldByCurrentThread()
Checks if the current thread owns this lock
|
void |
lock()
Acquires the lock
|
boolean |
tryLock()
Attempts to acquire the lock
|
void |
unlock()
Releases the lock
|
public boolean isHeldByCurrentThread()
ReentrantLockisHeldByCurrentThread in interface ReentrantLockpublic void lock()
ReentrantLocklock in interface ReentrantLockpublic boolean tryLock()
ReentrantLocktryLock in interface ReentrantLockpublic void unlock()
ReentrantLockunlock in interface ReentrantLock