public class BinaryMergeIterator<Entry> extends Object implements MutableObjectIterator<Entry>
MergeIterator
. Use RecordComparator
to compare record.Constructor and Description |
---|
BinaryMergeIterator(List<MutableObjectIterator<Entry>> iterators,
List<Entry> reusableEntries,
Comparator<Entry> comparator) |
Modifier and Type | Method and Description |
---|---|
Entry |
next()
Gets the next element from the collection.
|
Entry |
next(Entry reuse)
Gets the next element from the collection.
|
public BinaryMergeIterator(List<MutableObjectIterator<Entry>> iterators, List<Entry> reusableEntries, Comparator<Entry> comparator) throws IOException
IOException
public Entry next(Entry reuse) throws IOException
MutableObjectIterator
next
in interface MutableObjectIterator<Entry>
reuse
- The target object into which to place next element if E is mutable.null
if the iterator is exhausted.IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the
serialization / deserialization logicpublic Entry next() throws IOException
MutableObjectIterator
next
in interface MutableObjectIterator<Entry>
null
if the iterator is exhausted.IOException
- Thrown, if a problem occurred in the underlying I/O layer or in the
serialization / deserialization logicCopyright © 2023–2024 The Apache Software Foundation. All rights reserved.