org.springframework.data.hadoop.hbase
Interface ResultsExtractor<T>


public interface ResultsExtractor<T>

Callback handling scanner results. Implementations of this interface perform the actula work of extracting results from the ResultScanner but without having to worry about exception handling or resource management.

Author:
Costin Leau

Method Summary
 T extractData(ResultScanner results)
          Implementations must implement this method to process the entire ResultScanner.
 

Method Detail

extractData

T extractData(ResultScanner results)
              throws Exception
Implementations must implement this method to process the entire ResultScanner.

Parameters:
results - ResultScanner to extract data from. Implementations should not close this; it will be closed automatically by the calling HbaseTemplate
Returns:
an arbitrary result object, or null if none (the extractor will typically be stateful in the latter case).
Throws:
Exception - if an Hbase exception is encountered