org.apache.hadoop.hbase.regionserver
Interface KeyValueScanner

All Known Implementing Classes:
KeyValueHeap, MemStore.MemStoreScanner, MinorCompactingStoreScanner

public interface KeyValueScanner

Scanner that returns the next KeyValue.


Method Summary
 void close()
          Close the KeyValue scanner.
 KeyValue next()
          Return the next KeyValue in this scanner, iterating the scanner
 KeyValue peek()
          Look at the next KeyValue in this scanner, but do not iterate scanner.
 boolean reseek(KeyValue key)
          Reseek the scanner at or after the specified KeyValue.
 boolean seek(KeyValue key)
          Seek the scanner at or after the specified KeyValue.
 

Method Detail

peek

KeyValue peek()
Look at the next KeyValue in this scanner, but do not iterate scanner.

Returns:
the next KeyValue

next

KeyValue next()
              throws IOException
Return the next KeyValue in this scanner, iterating the scanner

Returns:
the next KeyValue
Throws:
IOException

seek

boolean seek(KeyValue key)
             throws IOException
Seek the scanner at or after the specified KeyValue.

Parameters:
key - seek value
Returns:
true if scanner has values left, false if end of scanner
Throws:
IOException

reseek

boolean reseek(KeyValue key)
               throws IOException
Reseek the scanner at or after the specified KeyValue. This method is guaranteed to seek to or before the required key only if the key comes after the current position of the scanner. Should not be used to seek to a key which may come before the current position.

Parameters:
key - seek value (should be non-null)
Returns:
true if scanner has values left, false if end of scanner
Throws:
IOException

close

void close()
Close the KeyValue scanner.



Copyright © 2010 Apache Software Foundation. All Rights Reserved.