Class HeapIterator

    • Constructor Detail

      • HeapIterator

        protected HeapIterator()
      • HeapIterator

        protected HeapIterator​(int maxSize)
    • Method Detail

      • createHeap

        protected void createHeap​(int maxSize)
      • getTopKey

        public final Key getTopKey()
        Description copied from interface: SortedKeyValueIterator
        Returns top key. Can be called 0 or more times without affecting behavior of next() or hasTop(). Note that in minor compaction scope and in non-full major compaction scopes the iterator may see deletion entries. These entries should be preserved by all iterators except ones that are strictly scan-time iterators that will never be configured for the minc or majc scopes. Deletion entries are only removed during full major compactions.

        For performance reasons, iterators reserve the right to reuse objects returned by getTopKey when SortedKeyValueIterator.next() is called, changing the data that the object references. Iterators that need to save an object returned by getTopKey ought to copy the object's data into a new object in order to avoid aliasing bugs.

        Specified by:
        getTopKey in interface SortedKeyValueIterator<Key,​Value>
        Returns:
        K
      • getTopValue

        public final Value getTopValue()
        Description copied from interface: SortedKeyValueIterator
        Returns top value. Can be called 0 or more times without affecting behavior of next() or hasTop().

        For performance reasons, iterators reserve the right to reuse objects returned by getTopValue when SortedKeyValueIterator.next() is called, changing the underlying data that the object references. Iterators that need to save an object returned by getTopValue ought to copy the object's data into a new object in order to avoid aliasing bugs.

        Specified by:
        getTopValue in interface SortedKeyValueIterator<Key,​Value>
        Returns:
        V
      • hasTop

        public final boolean hasTop()
        Description copied from interface: SortedKeyValueIterator
        Returns true if the iterator has more elements. Note that if this iterator has yielded (@see YieldingKeyValueIterator.enableYielding(YieldCallback)), this this method must return false.
        Specified by:
        hasTop in interface SortedKeyValueIterator<Key,​Value>
        Returns:
        true if the iterator has more elements.
      • next

        public final void next()
                        throws IOException
        Description copied from interface: SortedKeyValueIterator
        Advances to the next K,V pair. Note that in minor compaction scope and in non-full major compaction scopes the iterator may see deletion entries. These entries should be preserved by all iterators except ones that are strictly scan-time iterators that will never be configured for the minc or majc scopes. Deletion entries are only removed during full major compactions.
        Specified by:
        next in interface SortedKeyValueIterator<Key,​Value>
        Throws:
        IOException - if an I/O error occurs.
      • clear

        protected final void clear()