Package org.redisson.api
Interface RReadWriteLock
-
- All Superinterfaces:
ReadWriteLock
- All Known Implementing Classes:
RedissonReadWriteLock
public interface RReadWriteLock extends ReadWriteLock
AReadWriteLockmaintains a pair of associatedlocks, one for read-only operations and one for writing. Theread lockmay be held simultaneously by multiple reader threads, so long as there are no writers. Thewrite lockis exclusive. Works in non-fair mode. Therefore order of read and write locking is unspecified.- Author:
- Nikita Koksharov
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RLockreadLock()Returns the lock used for reading.RLockwriteLock()Returns the lock used for writing.
-
-
-
Method Detail
-
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
-
-