public final class WeakSafeReentrantReadWriteLock extends Object implements ReadWriteLock
ReadWriteLock
is retained.
Adapted from
https://github.com/google/guava/blob/v27.0.1/guava/src/com/google/common/util/concurrent/Striped.java#L319Constructor and Description |
---|
WeakSafeReentrantReadWriteLock()
Creates a new lock.
|
Modifier and Type | Method and Description |
---|---|
int |
getReadHoldCount()
Queries the number of reentrant read holds on this lock by the current thread.
|
int |
getWriteHoldCount()
Queries the number of reentrant write holds on this lock by the current thread.
|
Lock |
readLock() |
Lock |
writeLock() |
public WeakSafeReentrantReadWriteLock()
public Lock readLock()
readLock
in interface ReadWriteLock
public Lock writeLock()
writeLock
in interface ReadWriteLock
public int getReadHoldCount()
public int getWriteHoldCount()
Copyright © 2023. All Rights Reserved.