Package org.redisson.api
Interface RReadWriteLock
- All Superinterfaces:
ReadWriteLock
A
ReadWriteLock maintains a pair of associated locks, one for read-only operations and one for writing.
The read lock may be held simultaneously by
multiple reader threads, so long as there are no writers. The
write lock is exclusive.
Works in non-fair mode. Therefore order of read and write
locking is unspecified.-
Method Summary
-
Method Details
-
readLock
RLock readLock()Returns the lock used for reading.- Specified by:
readLockin interfaceReadWriteLock- Returns:
- the lock used for reading
-
writeLock
RLock writeLock()Returns the lock used for writing.- Specified by:
writeLockin interfaceReadWriteLock- Returns:
- the lock used for writing
-