public class ReadWriteLockRegistry extends Object
Registry for ReadWriteLock objects with ReadWriteLockKey as
keys. The behavior of acquiring and releasing locks is provided by a ConcurrentHashMap. This class is completely thread safe and ensures that
only one ReadWriteLock exists per key.
ReadWriteLock,
ReadWriteLockKey| Constructor and Description |
|---|
ReadWriteLockRegistry() |
| Modifier and Type | Method and Description |
|---|---|
Lock |
acquireLock(ReadWriteLockKey<?> readWriteLockKey) |
void |
releaseLock(ReadWriteLockKey<?> readWriteLockKey) |
public Lock acquireLock(ReadWriteLockKey<?> readWriteLockKey)
public void releaseLock(ReadWriteLockKey<?> readWriteLockKey)