Class KeyValueHeap

All Implemented Interfaces:
Closeable, AutoCloseable, InternalScanner, KeyValueScanner, Shipper
Direct Known Subclasses:
ReversedKeyValueHeap

Implements a heap merge across any number of KeyValueScanners.

Implements KeyValueScanner itself.

This class is used at the Region level to merge across Stores and at the Store level to merge across the memstore and StoreFiles.

In the Region case, we also need InternalScanner.next(List), so this class also implements InternalScanner. WARNING: As is, if you try to use this as an InternalScanner at the Store level, you will get runtime exceptions.