The queue should be cleared before stashing so as to not take the take
up memory.
Change-Id: I71c9a90e1ed9e4b7c7d47bb3e0785f67a8daf932
Signed-off-by: Robert Varga <rovarga@cisco.com>
this.baseXid = baseXid;
this.endXid = baseXid + queue.length;
this.reserve = queue.length - 1;
+ }
+
+ void retire() {
for (OutboundQueueEntry element : queue) {
element.reset();
}
private void retireQueue(final OutboundQueueImpl queue) {
if (queueCache.offer(queue)) {
+ queue.retire();
LOG.trace("Saving queue {} for later reuse", queue);
} else {
LOG.trace("Queue {} thrown away", queue);