- Collections API:
TransferQueue<E>- extends
BlockingQueue<E>interface - implementated by
LinkedTransferQueue<E> - blocking queue in which producer may wait for consumers to receive elements
- it can publish an element and wait for consumers or just publish and forget
- it can use a timeout to wait for a consumer
- methods:
getWaitingConsumerCount(): returns an estimate of the number of waiting consumer to receive elements viaBlockingQueuetakeor timedpoll.hasWaitingConsumer(): returns true if there is any waiting consumer.transfer(E): send an element and wait for the consumer.tryTransfer(E): send an element to a waiting consumer, return false immediately if there isn't any consumer.tryTransfer(E, long, TimeUnit): liketryTransferbut with a timeout to wait for a consumer before returning false.
- extends
java-7
Directory actions
More options
Directory actions
More options
java-7
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
parent directory.. | ||||