Package com.semedy.reasoner.core.locks
Interface ReadWriteUpdateLock
- All Superinterfaces:
ReadWriteLock
- All Known Implementing Classes:
ReentrantReadWriteUpdateLock
Extends the JDK
ReadWriteLock
, providing an update lock in addition to the read lock and the write
lock.
The update lock
supports read-only operations and can coexist with multiple
read lock
s held simultaneously by other reader threads. However it may also be upgraded from
its read-only status to a write lock
, and it may be downgraded again back to a read lock.
See implementation ReentrantReadWriteUpdateLock
for more details.- Author:
- Niall Gallagher
-
Method Summary
Modifier and TypeMethodDescriptionReturns a lock which allows reading and which may also be upgraded to a lock allowing writing.Methods inherited from interface java.util.concurrent.locks.ReadWriteLock
readLock, writeLock
-
Method Details
-
updateLock
Lock updateLock()Returns a lock which allows reading and which may also be upgraded to a lock allowing writing.- Returns:
- a lock which allows reading and which may also be upgraded to a lock allowing writing.
-