O
- The locked (hidden) objects type.public static class LockingVisitors.ReadWriteLockVisitor<O> extends LockingVisitors.LockVisitor<O,ReadWriteLock>
LockingVisitors.LockVisitor.acceptReadLocked(FailableConsumer)
, LockingVisitors.LockVisitor.acceptWriteLocked(FailableConsumer)
,
LockingVisitors.LockVisitor.applyReadLocked(FailableFunction)
, and LockingVisitors.LockVisitor.applyWriteLocked(FailableFunction)
. By doing so, the
necessary protections are guaranteed.Modifier | Constructor and Description |
---|---|
protected |
ReadWriteLockVisitor(O object,
ReadWriteLock readWriteLock)
Creates a new instance with the given locked object.
|
acceptReadLocked, acceptWriteLocked, applyReadLocked, applyWriteLocked, getLock, getObject, lockAcceptUnlock, lockApplyUnlock
protected ReadWriteLockVisitor(O object, ReadWriteLock readWriteLock)
LockingVisitors.stampedLockVisitor(Object)
instead.object
- The locked (hidden) object. The caller is supposed to drop all references to the locked object.readWriteLock
- the lock to use.Copyright © 2001–2020 The Apache Software Foundation. All rights reserved.