FairBlockingQueue.ExchangeCountDownLatch (Apache Tomcat 10.1.56 API Documentation)
Description: declaration: package: org.apache.tomcat.jdbc.pool, class: FairBlockingQueue, class: ExchangeCountDownLatch

# Class FairBlockingQueue.ExchangeCountDownLatch<T>

java.lang.Object
java.util.concurrent.CountDownLatch
org.apache.tomcat.jdbc.pool.FairBlockingQueue.ExchangeCountDownLatch<T>

Type Parameters:
  `T` - the type of the item to exchange

Enclosing class:
  `FairBlockingQueue<E>`

protected class FairBlockingQueue.ExchangeCountDownLatch<T> extends CountDownLatch
A count down latch that can be used to exchange information.

- ## Field Summary

  Fields
  Modifier and Type
  Field
  Description
  `protected T`
  `item`
  The item to exchange.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ExchangeCountDownLatch(int i)`
  Creates a new ExchangeCountDownLatch with the given count.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `T`
  `getItem()`
  Returns the exchanged item.
  `void`
  `setItem(T item)`
  Sets the item to be exchanged.

  ### Methods inherited from class CountDownLatch

  `await, await, countDown, getCount, toString`

  ### Methods inherited from class Object

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

- ## Field Details

  - ### item

    protected volatile T item
    The item to exchange.

- ## Constructor Details

  - ### ExchangeCountDownLatch

    public ExchangeCountDownLatch(int i)
    Creates a new ExchangeCountDownLatch with the given count.
    Parameters:
      `i` - the count

- ## Method Details

  - ### getItem

    public T getItem()
    Returns the exchanged item.
    Returns:
      the item

  - ### setItem

    public void setItem(T item)
    Sets the item to be exchanged.
    Parameters:
      `item` - the item