|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.logicalcobwebs.concurrent.WriterPreferenceReadWriteLock org.logicalcobwebs.concurrent.ReaderPreferenceReadWriteLock
public class ReaderPreferenceReadWriteLock
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.
[ Introduction to this package. ]
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.logicalcobwebs.concurrent.WriterPreferenceReadWriteLock |
---|
WriterPreferenceReadWriteLock.ReaderLock, WriterPreferenceReadWriteLock.Signaller, WriterPreferenceReadWriteLock.WriterLock |
Field Summary |
---|
Fields inherited from class org.logicalcobwebs.concurrent.WriterPreferenceReadWriteLock |
---|
activeReaders_, activeWriter_, readerLock_, waitingReaders_, waitingWriters_, writerLock_ |
Constructor Summary | |
---|---|
ReaderPreferenceReadWriteLock()
|
Method Summary | |
---|---|
protected boolean |
allowReader()
Override this method to change to reader preference |
Methods inherited from class org.logicalcobwebs.concurrent.WriterPreferenceReadWriteLock |
---|
cancelledWaitingReader, cancelledWaitingWriter, endRead, endWrite, readLock, startRead, startReadFromNewReader, startReadFromWaitingReader, startWrite, startWriteFromNewWriter, startWriteFromWaitingWriter, writeLock |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReaderPreferenceReadWriteLock()
Method Detail |
---|
protected boolean allowReader()
WriterPreferenceReadWriteLock
allowReader
in class WriterPreferenceReadWriteLock
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |