Code example for BlockingQueue

Methods: drainTo

0
  @Override 
  public int dequeue( Collection< ? super T > collection, int maxElements )
  { 
    if ( collection != null )
    { 
      return queue.drainTo( collection, maxElements );
    } 
    return 0; 
  } 
   
  /* 
   * (non-Javadoc) 
   *  
   * @see 
   * de.unikassel.android.sdcframework.util.facade.EventCollector#getEventCount 
   * () 
   */ 
  @Override 
  public final int getEventCount() 
  { 
    return queue.size();