org.metasyntactic.thread.concurrent
Class ReaderPreferenceReadWriteLock

java.lang.Object
  |
  +--org.metasyntactic.thread.concurrent.WriterPreferenceReadWriteLock
        |
        +--org.metasyntactic.thread.concurrent.ReaderPreferenceReadWriteLock
All Implemented Interfaces:
ReadWriteLock

public class ReaderPreferenceReadWriteLock
extends WriterPreferenceReadWriteLock

A ReadWriteLock that prefers waiting readers over waiting writers when there is contention. The range of applicability of this class is very limited. In the majority of situations, writer preference locks provide more reasonable semantics.


Field Summary
 
Fields inherited from class org.metasyntactic.thread.concurrent.WriterPreferenceReadWriteLock
activeWriter
 
Constructor Summary
ReaderPreferenceReadWriteLock()
           
 
Method Summary
protected  boolean allowReader()
           
 
Methods inherited from class org.metasyntactic.thread.concurrent.WriterPreferenceReadWriteLock
readLock, writeLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReaderPreferenceReadWriteLock

public ReaderPreferenceReadWriteLock()
Method Detail

allowReader

protected boolean allowReader()