Package org.apache.solr.common

# Class SolrCloseableLatch

java.lang.Object
org.apache.solr.common.SolrCloseableLatch

public class SolrCloseableLatch extends Object
This class mimics the operation of `CountDownLatch`, but it also periodically checks the state of the provided `SolrCloseable` and terminates the wait if it's closed by throwing an `InterruptedException`.

## Constructor Summary

Constructors
Constructor
Description
`SolrCloseableLatch(int count, SolrCloseable closeable)`

## Method Summary

Modifier and Type
Method
Description
`void`
`await()`
`boolean`
`await(long timeout, TimeUnit unit)`
`void`
`countDown()`
`long`
`getCount()`

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

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

## Constructor Details

### SolrCloseableLatch

public SolrCloseableLatch(int count, SolrCloseable closeable)

## Method Details

### await

public void await() throws InterruptedException

Throws:
  `InterruptedException`

### await

public boolean await(long timeout, TimeUnit unit) throws InterruptedException

Throws:
  `InterruptedException`

### countDown

public void countDown()

### getCount

public long getCount()