Code example for BlockingQueue

Methods: size

0
  public void add(T object) throws InterruptedException {
    this.objects.offer(object);
  } 
 
  public int poolSize() { 
    return objects.size();
  } 
}