插入数据 boolean add(E e);//成功返回true,没有可用空间的化抛出IllegalStateException异常,如果是固定容量的队列,建议使用offer方法
boolean offer(E e);成功返回true,失败返回false
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; 带时间的阻塞,返回队首元素或null
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);//指定最大数量添加到集合中