public class JvmReadWriteLock extends java.lang.Object implements ReadWriteLock
ReadWriteLock for JVM environments| Constructor and Description |
|---|
JvmReadWriteLock() |
| Modifier and Type | Method and Description |
|---|---|
void |
lockRead()
Acquires the read lock
|
void |
lockWrite()
Acquires the write lock
|
boolean |
tryLockRead()
Attempts to acquire the read lock
|
boolean |
tryLockWrite()
Attempts to acquire the write lock
|
void |
unlockRead()
Releases the read lock
|
void |
unlockWrite()
Releases the write lock
|
public void lockRead()
ReadWriteLocklockRead in interface ReadWriteLockpublic boolean tryLockRead()
ReadWriteLocktryLockRead in interface ReadWriteLockpublic void unlockRead()
ReadWriteLockunlockRead in interface ReadWriteLockpublic void lockWrite()
ReadWriteLocklockWrite in interface ReadWriteLockpublic boolean tryLockWrite()
ReadWriteLocktryLockWrite in interface ReadWriteLockpublic void unlockWrite()
ReadWriteLockunlockWrite in interface ReadWriteLock