Class LockingVisitors.ReadWriteLockVisitor<O>
- java.lang.Object
-
- org.apache.commons.lang3.concurrent.locks.LockingVisitors.LockVisitor<O,java.util.concurrent.locks.ReadWriteLock>
-
- org.apache.commons.lang3.concurrent.locks.LockingVisitors.ReadWriteLockVisitor<O>
-
- Type Parameters:
O
- The locked (hidden) objects type.
- Enclosing class:
- LockingVisitors
public static class LockingVisitors.ReadWriteLockVisitor<O> extends LockingVisitors.LockVisitor<O,java.util.concurrent.locks.ReadWriteLock>
This class implements a wrapper for a locked (hidden) object, and provides the means to access it. The basic idea, is that the user code forsakes all references to the locked object, using only the wrapper object, and the accessor methodsLockingVisitors.LockVisitor.acceptReadLocked(FailableConsumer)
,LockingVisitors.LockVisitor.acceptWriteLocked(FailableConsumer)
,LockingVisitors.LockVisitor.applyReadLocked(FailableFunction)
, andLockingVisitors.LockVisitor.applyWriteLocked(FailableFunction)
. By doing so, the necessary protections are guaranteed.
-
-
Method Summary
-
Methods inherited from class org.apache.commons.lang3.concurrent.locks.LockingVisitors.LockVisitor
acceptReadLocked, acceptWriteLocked, applyReadLocked, applyWriteLocked, getLock, getObject
-
-