com.liferay.portal.kernel.concurrent
Class ReadWriteLockRegistry

java.lang.Object
  extended by com.liferay.portal.kernel.concurrent.ReadWriteLockRegistry

public class ReadWriteLockRegistry
extends java.lang.Object

View Source 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. View Source

Author:
Shuyang Zhou
See Also:
ReadWriteLock, ReadWriteLockKey

Constructor Summary
ReadWriteLockRegistry()
           
 
Method Summary
 java.util.concurrent.locks.Lock acquireLock(ReadWriteLockKey<?> readWriteLockKey)
           
 void releaseLock(ReadWriteLockKey<?> readWriteLockKey)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReadWriteLockRegistry

public ReadWriteLockRegistry()
Method Detail

acquireLock

public java.util.concurrent.locks.Lock acquireLock(ReadWriteLockKey<?> readWriteLockKey)

releaseLock

public void releaseLock(ReadWriteLockKey<?> readWriteLockKey)