1 7 8 package java.util.concurrent; 9 10 import java.util.Collection ; 11 import java.util.Queue ; 12 13 105 public interface BlockingQueue<E> extends Queue <E> { 106 107 119 boolean offer(E o); 120 121 134 boolean offer(E o, long timeout, TimeUnit unit) 135 throws InterruptedException ; 136 137 149 E poll(long timeout, TimeUnit unit) 150 throws InterruptedException ; 151 152 158 E take() throws InterruptedException ; 159 160 167 void put(E o) throws InterruptedException ; 168 169 181 int remainingCapacity(); 182 183 194 boolean add(E o); 195 196 214 int drainTo(Collection <? super E> c); 215 216 233 int drainTo(Collection <? super E> c, int maxElements); 234 } 235 | Popular Tags |