org.apache.accumulo.core.iterators
Class HeapIterator

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

public abstract class HeapIterator
extends java.lang.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().

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 java.io.IOException
Description copied from interface: SortedKeyValueIterator
Advances to the next K,V pair.

Specified by:
next in interface SortedKeyValueIterator<Key,Value>
Throws:
java.io.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.