Class Striped.WeakSafeReadWriteLock

  • All Implemented Interfaces:
    java.util.concurrent.locks.ReadWriteLock
    Enclosing class:
    Striped<L>

    private static final class Striped.WeakSafeReadWriteLock
    extends java.lang.Object
    implements java.util.concurrent.locks.ReadWriteLock
    ReadWriteLock implementation whose read and write locks retain a reference back to this lock. Otherwise, a reference to just the read lock or just the write lock would not suffice to ensure the ReadWriteLock is retained.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.locks.ReadWriteLock delegate  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.util.concurrent.locks.Lock readLock()  
      java.util.concurrent.locks.Lock writeLock()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • delegate

        private final java.util.concurrent.locks.ReadWriteLock delegate
    • Constructor Detail

      • WeakSafeReadWriteLock

        WeakSafeReadWriteLock()
    • Method Detail

      • readLock

        public java.util.concurrent.locks.Lock readLock()
        Specified by:
        readLock in interface java.util.concurrent.locks.ReadWriteLock
      • writeLock

        public java.util.concurrent.locks.Lock writeLock()
        Specified by:
        writeLock in interface java.util.concurrent.locks.ReadWriteLock