List of usage examples for org.apache.commons.collections4.queue CircularFifoQueue addAll
boolean addAll(Collection<? extends E> c);
From source file:org.socraticgrid.hl7.services.orders.functional.EventLogger.java
/** * @param eventBufferSize/*from ww w. j a v a2 s .c o m*/ * the eventBufferSize to set */ public void setEventBufferSize(int eventBufferSize) { if (this.eventQueue != null && (this.eventBufferSize != eventBufferSize)) { // Resize the buffer as required CircularFifoQueue<LogEntry> newQueue = new CircularFifoQueue<LogEntry>(eventBufferSize); // Move old entries to the new Buffer newQueue.addAll(eventQueue); eventQueue.clear(); eventQueue = newQueue; } this.eventBufferSize = eventBufferSize; }