Package org.apache.commons.lang3.concurrent.locks

# Class LockingVisitors.LockVisitor.LVBuilder<O,L,B extends LockingVisitors.LockVisitor.LVBuilder<O,L,B>>

java.lang.Object
org.apache.commons.lang3.builder.AbstractSupplier<LockingVisitors.LockVisitor<O,L>,B,RuntimeException>
org.apache.commons.lang3.concurrent.locks.LockingVisitors.LockVisitor.LVBuilder<O,L,B>

Type Parameters:
  `O` - the wrapped object type.
  `L` - the wrapped lock type.
  `B` - the builder type.

All Implemented Interfaces:
  `FailableSupplier<LockingVisitors.LockVisitor<O,L>,RuntimeException>`

Direct Known Subclasses:
  `LockingVisitors.ReadWriteLockVisitor.Builder`, `LockingVisitors.ReentrantLockVisitor.Builder`, `LockingVisitors.StampedLockVisitor.Builder`

Enclosing class:
  LockingVisitors.LockVisitor<O,L>

public static class LockingVisitors.LockVisitor.LVBuilder<O,L,B extends LockingVisitors.LockVisitor.LVBuilder<O,L,B>> extends AbstractSupplier<LockingVisitors.LockVisitor<O,L>,B,RuntimeException>
Builds `LockingVisitors.LockVisitor` instances.

Since:
  3.18.0

- ## Field Summary

  ### Fields inherited from interface org.apache.commons.lang3.function.FailableSupplier

  `NUL`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `LVBuilder()`
  Constructs a new instance.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `LockingVisitors.LockVisitor<O,L>`
  `get()`
  Supplies an object
  `B`
  `setLock(L lock)`
  Set the lock used from accept methods.
  `B`
  `setObject(O object)`
  Set the resource.
  `B`
  `setReadLockSupplier(Supplier<Lock> readLockSupplier)`
  Supplies the read lock.
  `B`
  `setWriteLockSupplier(Supplier<Lock> writeLockSupplier)`
  Supplies the write lock.

  ### Methods inherited from class org.apache.commons.lang3.builder.AbstractSupplier

  `asThis`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### LVBuilder

    public LVBuilder()
    Constructs a new instance.

- ## Method Details

  - ### get

    public LockingVisitors.LockVisitor<O,L> get()
    Description copied from interface: `FailableSupplier`
    Supplies an object
    Returns:
      a result

  - ### setLock

    public B setLock(L lock)
    Set the lock used from accept methods.
    Parameters:
      `lock` - the lock.
    Returns:
      `this` instance.

  - ### setObject

    public B setObject(O object)
    Set the resource.
    Parameters:
      `object` - the resource.
    Returns:
      `this` instance.

  - ### setReadLockSupplier

    public B setReadLockSupplier(Supplier<Lock> readLockSupplier)
    Supplies the read lock.
    Parameters:
      `readLockSupplier` - Supplies the read lock.
    Returns:
      `this` instance.

  - ### setWriteLockSupplier

    public B setWriteLockSupplier(Supplier<Lock> writeLockSupplier)
    Supplies the write lock.
    Parameters:
      `writeLockSupplier` - Supplies the write lock.
    Returns:
      `this` instance.