final public void clear(final boolean clearRefs){
  lock.lock();
  try {
    if (threadLocalBuffers) {
      for (      BatchQueue<T> q : threadLocalQueues.values()) {
        q.clear(clearRefs);
      }
      threadLocalQueues.clear();
    }
 else {
      for (      BatchQueue<T> q : buffers) {
        q.clear(clearRefs);
      }
    }
    sharedQueue.clear(true);
  }
  finally {
    lock.unlock();
  }
}

final public void clear ( final boolean clearRefs ) { lock . lock ( ) ; try { if ( threadLocalBuffers ) { for ( BatchQueue < T > q : threadLocalQueues . values ( ) ) { q . clear ( clearRefs ) ; } threadLocalQueues . clear ( ) ; } else { for ( BatchQueue < T > q : buffers ) { q . clear ( clearRefs ) ; } } sharedQueue . clear ( true ) ; } finally { lock . unlock ( ) ; } }
discards the thread - local buffers and clears the backing ring buffer . < p > note : this method can have side - effects from asynchronous operations if the queue is still in use .
