boolean add(E e);boolean offer(E e);void put(E e) throws InterruptedException; |
E take() throws InterruptedException;E poll(long timeout, TimeUnit unit) throws InterruptedException;boolean remove(Object o); |
//存放元素final Object[] items; //取元素的索引int takeIndex;//存元素的索引int putIndex;//元素的数量int count;//控制并发的锁final ReentrantLock lock;//非空条件信号量private final Condition notEmpty;//非满条件信号量private final Condition notFull;transient Itrs itrs = null; |
欢迎光临 创意电子 (https://wxcydz.cc/) | Powered by Discuz! X3.4 |