# Class: com.pnfsoftware.jeb.util.collect.AsyncEventQueue

Highly efficient, loosely bounded concurrent pseudo\-queue for single\-reader/multiple\-writers scenarios. The implementation relies on [ConcurrentLinkedQueue](ConcurrentLinkedQueue). 

 If the bound is reached, newest elements are dropped. To achieve high write efficiency and avoid locking, the queue is loosely bounded: under certain conditions, elements may be dropped although the queue did not reach its capacity; conversely, elements may be added although the queue reached its capacity. To lift this uncertainty, use a bound of [Integer#MAX_VALUE](Integer#MAX_VALUE). The writers should never never pull elements. Null elements are illegal.

## Constructor: AsyncEventQueue

Description: Create an unbounded queue.

## Constructor: AsyncEventQueue
- parameter: `capacity`, type: `int`

Description: Create a queue, optionally bounded.
parameter: capacity: 

## Method: add
- parameter: `e`, type: `E`
- return type: `boolean`

Description: Add to the tail of the queue.
parameter: e: non\-null entry to be enqueued
return: true if the element was added, false if it was dropped

## Method: clear


## Method: isEmpty
- return type: `boolean`


## Method: pull
- return type: `E`

Description: Pull the head, unless the queue is empty, in which case null is returned.
implementation note: this method must not be used by the producers; its use is strictly reserved by the           single consumer
return: the head or null

## Method: pullAll
- return type: `java.util.List<E>`

Description: Pull all elements.
return: 

## Method: readAll
- return type: `java.util.List<E>`


## Method: size
- return type: `int`


## Method: toString
- return type: `java.lang.String`


