Class XAReentrantWriterPreferenceReadWriteLock

  • All Implemented Interfaces:
    EDU.oswego.cs.dl.util.concurrent.ReadWriteLock

    public class XAReentrantWriterPreferenceReadWriteLock
    extends EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock
    A reentrant read-write lock for synchronization. Unlike a normal reentrant lock, this one allows the lock to be re-entered not just by a thread that's already holding the lock but by any thread within the same transaction.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock

        EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock.ReaderLock, EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock.Signaller, EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock.WriterLock
    • Field Summary

      • Fields inherited from class EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock

        IONE, readers_, writeHolds_
      • Fields inherited from class EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock

        activeReaders_, activeWriter_, readerLock_, waitingReaders_, waitingWriters_, writerLock_
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected boolean allowReader()
      protected EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock.Signaller endRead()
      protected EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock.Signaller endWrite()
      protected boolean startRead()
      protected boolean startWrite()
      • Methods inherited from class EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock

        cancelledWaitingReader, cancelledWaitingWriter, readLock, startReadFromNewReader, startReadFromWaitingReader, startWriteFromNewWriter, startWriteFromWaitingWriter, writeLock
    • Constructor Detail

      • XAReentrantWriterPreferenceReadWriteLock

        public XAReentrantWriterPreferenceReadWriteLock()
    • Method Detail

      • allowReader

        protected boolean allowReader()
        Overrides:
        allowReader in class EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock
      • startWrite

        protected boolean startWrite()
        Overrides:
        startWrite in class EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock
      • endWrite

        protected EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock.Signaller endWrite()
        Overrides:
        endWrite in class EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock
      • startRead

        protected boolean startRead()
        Overrides:
        startRead in class EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock
      • endRead

        protected EDU.oswego.cs.dl.util.concurrent.WriterPreferenceReadWriteLock.Signaller endRead()
        Overrides:
        endRead in class EDU.oswego.cs.dl.util.concurrent.ReentrantWriterPreferenceReadWriteLock