Interface RReadWriteLockRx

  • All Known Implementing Classes:
    RedissonReadWriteLockRx

    public interface RReadWriteLockRx
    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.
    Author:
    Nikita Koksharov
    • Method Detail

      • readLock

        RLockRx readLock()
        Returns the lock used for reading.
        Returns:
        the lock used for reading
      • writeLock

        RLockRx writeLock()
        Returns the lock used for writing.
        Returns:
        the lock used for writing