Class ReadWriteLockDecorator

  • All Implemented Interfaces:
    java.util.concurrent.locks.ReadWriteLock
    Direct Known Subclasses:
    DecoratorReadWriteLockCollection, DecoratorReadWriteLockMap

    public class ReadWriteLockDecorator
    extends java.lang.Object
    implements java.util.concurrent.locks.ReadWriteLock
    A read/write lock that decorates another read/write lock.
    Author:
    Garret Wilson
    • Constructor Summary

      Constructors 
      Constructor Description
      ReadWriteLockDecorator​(java.util.concurrent.locks.ReadWriteLock readWriteLock)
      Read write lock constructor.
    • 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
    • Constructor Detail

      • ReadWriteLockDecorator

        public ReadWriteLockDecorator​(java.util.concurrent.locks.ReadWriteLock readWriteLock)
        Read write lock constructor.
        Parameters:
        readWriteLock - The lock for controlling access to the properties.
        Throws:
        java.lang.NullPointerException - if the given lock is null.
    • 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