com.atlassian.jira.util.concurrent
Class SafeReadWriteLock

java.lang.Object
  extended by 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.


Constructor Summary
SafeReadWriteLock()
           
 
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
 

Constructor Detail

SafeReadWriteLock

public SafeReadWriteLock()
Method Detail

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-2008 Atlassian. All Rights Reserved.