O - The type of the object to protect.public static class LockingVisitors.ReentrantLockVisitor<O> extends LockingVisitors.LockVisitor<O,java.util.concurrent.locks.ReentrantLock>
ReentrantLock and object to protect. To access the object, use the methods LockingVisitors.LockVisitor.acceptReadLocked(FailableConsumer),
LockingVisitors.LockVisitor.acceptWriteLocked(FailableConsumer), LockingVisitors.LockVisitor.applyReadLocked(FailableFunction), and LockingVisitors.LockVisitor.applyWriteLocked(FailableFunction). The visitor
holds the lock while the consumer or function is called.LockingVisitors.reentrantLockVisitor(Object)| Modifier and Type | Class and Description |
|---|---|
static class |
LockingVisitors.ReentrantLockVisitor.Builder<O>
Builds
LockingVisitors.LockVisitor instances. |
LockingVisitors.LockVisitor.LVBuilder<O,L,B extends LockingVisitors.LockVisitor.LVBuilder<O,L,B>>| Modifier and Type | Method and Description |
|---|---|
static <O> LockingVisitors.ReentrantLockVisitor.Builder<O> |
builder()
Creates a new builder.
|
acceptReadLocked, acceptWriteLocked, applyReadLocked, applyWriteLocked, getLock, getObjectpublic static <O> LockingVisitors.ReentrantLockVisitor.Builder<O> builder()
O - the wrapped object type.Copyright © 2010 - 2025 Adobe. All Rights Reserved