org.apache.accumulo.core.iterators.system
Class HeapIterator

java.lang.Object
  extended by org.apache.accumulo.core.iterators.system.HeapIterator
All Implemented Interfaces:
SortedKeyValueIterator<Key,Value>
Direct Known Subclasses:
MultiIterator, RFile.Reader

public abstract class HeapIterator
extends Object
implements SortedKeyValueIterator<Key,Value>


Constructor Summary
protected HeapIterator()
           
protected HeapIterator(int maxSize)
           
 
Method Summary
protected  void addSource(SortedKeyValueIterator<Key,Value> source)
           
protected  void clear()
           
protected  void createHeap(int maxSize)
           
 Key getTopKey()
          Returns top key.
 Value getTopValue()
          Returns top value.
 boolean hasTop()
          Returns true if the iterator has more elements.
 void next()
          Advances to the next K,V pair.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.accumulo.core.iterators.SortedKeyValueIterator
deepCopy, init, seek
 

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.

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().

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.

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()

addSource

protected final void addSource(SortedKeyValueIterator<Key,Value> source)


Copyright © 2012 The Apache Software Foundation. All Rights Reserved.