1. 程式人生 > >【2019春招準備:13. 安全Collections----13.1 BlockingQueue阻塞佇列家族】

【2019春招準備:13. 安全Collections----13.1 BlockingQueue阻塞佇列家族】

參考:強烈推薦 http://www.cnblogs.com/WangHaiMing/p/8798709.html
BlockingQueue介面

public interface BlockingQueue<E> extends Queue<E> {
	boolean add(E e);
	boolean offer(E e);
	void put(E e) throws InterruptedException;
	boolean offer(E e, long timeout, TimeUnit unit) throws InterruptedException;
E take() throws InterruptedException; E poll(long timeout, TimeUnit unit) throws InterruptedException; int remainingCapacity(); boolean remove(Object o); public boolean contains(Object o); int drainTo(Collection<? super E> c); int drainTo(Collection<? super E> c, int maxElements)
; }

家庭成員
在這裡插入圖片描述