com.atlassian.jira.util.concurrent
Class SafeReadWriteLock
java.lang.Object
com.atlassian.jira.util.concurrent.SafeReadWriteLock
- All Implemented Interfaces:
- edu.emory.mathcs.backport.java.util.concurrent.locks.ReadWriteLock
public class SafeReadWriteLock
- extends Object
- implements edu.emory.mathcs.backport.java.util.concurrent.locks.ReadWriteLock
A wrapper class for ReentrantReadWriteLock
that throws an IllegalMonitorStateException
if a thread
that holds the read lock tries to promote it to a write lock. Otherwise it totally obeys the
ReentrantReadWriteLock
contract.
Method Summary |
edu.emory.mathcs.backport.java.util.concurrent.locks.Lock |
readLock()
|
edu.emory.mathcs.backport.java.util.concurrent.locks.Lock |
writeLock()
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SafeReadWriteLock
public SafeReadWriteLock()
readLock
public edu.emory.mathcs.backport.java.util.concurrent.locks.Lock readLock()
- Specified by:
readLock
in interface edu.emory.mathcs.backport.java.util.concurrent.locks.ReadWriteLock
writeLock
public edu.emory.mathcs.backport.java.util.concurrent.locks.Lock writeLock()
- Specified by:
writeLock
in interface edu.emory.mathcs.backport.java.util.concurrent.locks.ReadWriteLock
Copyright © 2002-2009 Atlassian. All Rights Reserved.