|Constructor and Description|
Creates a new instance of RW lock that will lock with the given mode.
|Modifier and Type||Method and Description|
Downgrade from a write to a read lock.
public RWLockResource(ReentrantReadWriteLock rwLock, LockMode mode, boolean acquireLock, boolean useTryLock)
rwLock- the read-write lock backing the resource
mode- the initial lock mode if acquiring the lock
acquireLock- whether or not to acquire the lock
useTryLock- whether or not to use
Lock.tryLock()when acquiring the resource
Copyright © 2023. All Rights Reserved.