Class LockingVisitors.ReentrantLockVisitor<O>

java.lang.Object
org.apache.commons.lang3.concurrent.locks.LockingVisitors.LockVisitor<O,ReentrantLock>
org.apache.commons.lang3.concurrent.locks.LockingVisitors.ReentrantLockVisitor<O>
Type Parameters:
O - The type of the object to protect.
Enclosing class:
LockingVisitors

Since:
3.18.0
See Also:
  • Constructor Details

    • ReentrantLockVisitor

      protected ReentrantLockVisitor(O object, ReentrantLock reentrantLock)
      Creates a new instance with the given object and lock.

      This visitor uses the given ReentrantLock for all of its accept and apply methods.

      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:
  • Method Details