@ThreadSafe public final class ClientRWLock extends Object implements ReadWriteLock
Constructor and Description |
---|
ClientRWLock(int maxReaders)
Constructs a new
ClientRWLock . |
Modifier and Type | Method and Description |
---|---|
void |
addReference()
Increments the reference count.
|
int |
dropReference()
Decrements the reference count.
|
int |
getReferenceCount() |
Lock |
readLock() |
Lock |
writeLock() |
public ClientRWLock(int maxReaders)
ClientRWLock
.maxReaders
- total number of permits, decides the max number of concurrent readerspublic Lock readLock()
readLock
in interface ReadWriteLock
public Lock writeLock()
writeLock
in interface ReadWriteLock
public int getReferenceCount()
public void addReference()
public int dropReference()
Copyright © 2023. All Rights Reserved.