com.liferay.portal.kernel.concurrent
Class ReadWriteLockRegistry
java.lang.Object
com.liferay.portal.kernel.concurrent.ReadWriteLockRegistry
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.
- See Also:
ReadWriteLock
,
ReadWriteLockKey
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ReadWriteLockRegistry
public ReadWriteLockRegistry()
acquireLock
public Lock acquireLock(ReadWriteLockKey<?> readWriteLockKey)
releaseLock
public void releaseLock(ReadWriteLockKey<?> readWriteLockKey)