public interface RwLock
Modifier and Type | Method and Description |
---|---|
boolean |
hasReadLock()
Check if the current thread holds read lock.
|
boolean |
hasWriteLock()
Check if the current thread holds write lock.
|
void |
readLock()
Acquire read lock.
|
void |
readLockInterruptibly()
Acquire read lock, unless interrupted while waiting
|
void |
readUnlock()
Release read lock.
|
void |
readUnlock(String opName)
Release read lock with operation name.
|
void |
writeLock()
Acquire write lock.
|
void |
writeLockInterruptibly()
Acquire write lock, unless interrupted while waiting
|
void |
writeUnlock()
Release write lock.
|
void |
writeUnlock(String opName)
Release write lock with operation name.
|
void readLock()
void readLockInterruptibly() throws InterruptedException
InterruptedException
void readUnlock()
void readUnlock(String opName)
opName
- Option name.boolean hasReadLock()
void writeLock()
void writeLockInterruptibly() throws InterruptedException
InterruptedException
void writeUnlock()
void writeUnlock(String opName)
opName
- Option name.boolean hasWriteLock()
Copyright © 2008–2024 Apache Software Foundation. All rights reserved.