@Override public int size() { int size = 0; for (MappedByteBufferSegmentQueue<T> queue : getSegmentQueues()) { size += queue.size(); } return size; }
@Override public void clear() { for (MappedByteBufferSegmentQueue<T> queue : getSegmentQueues()) { queue.clear(); } currentIndex = -1; currentQueue = null; mergedQueue = null; }
private void initMergedQueue() { if (mergedQueue == null && currentIndex >= 0) { mergedQueue = MinMaxPriorityQueue.<MappedByteBufferSegmentQueue<T>> orderedBy( getSegmentQueueComparator()).maximumSize(currentIndex + 1).create(); for (MappedByteBufferSegmentQueue<T> queue : getSegmentQueues()) { T re = queue.peek(); if (re != null) { mergedQueue.add(queue); } } } }
@Override public int size() { int size = 0; for (MappedByteBufferSegmentQueue<T> queue : getSegmentQueues()) { size += queue.size(); } return size; }
@Override public void clear() { for (MappedByteBufferSegmentQueue<T> queue : getSegmentQueues()) { queue.clear(); } currentIndex = -1; currentQueue = null; mergedQueue = null; }
@Override public void clear() { for (MappedByteBufferSegmentQueue<T> queue : getSegmentQueues()) { queue.clear(); } currentIndex = -1; currentQueue = null; mergedQueue = null; }
@Override public int size() { int size = 0; for (MappedByteBufferSegmentQueue<T> queue : getSegmentQueues()) { size += queue.size(); } return size; }
private void initMergedQueue() { if (mergedQueue == null && currentIndex >= 0) { mergedQueue = MinMaxPriorityQueue.<MappedByteBufferSegmentQueue<T>> orderedBy( getSegmentQueueComparator()).maximumSize(currentIndex + 1).create(); for (MappedByteBufferSegmentQueue<T> queue : getSegmentQueues()) { T re = queue.peek(); if (re != null) { mergedQueue.add(queue); } } } }
private void initMergedQueue() { if (mergedQueue == null && currentIndex >= 0) { mergedQueue = MinMaxPriorityQueue.<MappedByteBufferSegmentQueue<T>> orderedBy( getSegmentQueueComparator()).maximumSize(currentIndex + 1).create(); for (MappedByteBufferSegmentQueue<T> queue : getSegmentQueues()) { T re = queue.peek(); if (re != null) { mergedQueue.add(queue); } } } }