Class LockingVisitors.ReentrantLockVisitor<O>

    • Constructor Detail

      • ReentrantLockVisitor

        protected ReentrantLockVisitor​(O object,
                                       java.util.concurrent.locks.ReentrantLock reentrantLock)
        Creates a new instance with the given object and lock.

        This visitor uses the given ReentrantLock for both read and write methods; both acquire it exclusively.

        Parameters:
        object - The object to protect. The caller is supposed to drop all references to the locked object.
        reentrantLock - The lock to use.
        See Also:
        LockingVisitors