public class JvmReentrantLock extends java.lang.Object implements ReentrantLock
ReentrantLock
for JVM environmentsConstructor 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()
ReentrantLock
isHeldByCurrentThread
in interface ReentrantLock
public void lock()
ReentrantLock
lock
in interface ReentrantLock
public boolean tryLock()
ReentrantLock
tryLock
in interface ReentrantLock
public void unlock()
ReentrantLock
unlock
in interface ReentrantLock