@InterfaceAudience.Private class CompleteScanResultCache extends Object implements ScanResultCache
| Modifier and Type | Field and Description |
|---|---|
private int |
numberOfCompleteRows |
private List<Result> |
partialResults |
EMPTY_RESULT_ARRAY| Constructor and Description |
|---|
CompleteScanResultCache() |
| Modifier and Type | Method and Description |
|---|---|
Result[] |
addAndGet(Result[] results,
boolean isHeartbeatMessage)
Add the given results to cache and get valid results back.
|
void |
clear()
Clear the cached result if any.
|
private Result |
combine() |
int |
numberOfCompleteRows()
Return the number of complete rows.
|
private Result[] |
prependCombined(Result[] results,
int length) |
private Result[] |
updateNumberOfCompleteResultsAndReturn(Result... results) |
private int numberOfCompleteRows
private final List<Result> partialResults
CompleteScanResultCache()
private Result combine() throws IOException
IOExceptionprivate Result[] prependCombined(Result[] results, int length) throws IOException
IOExceptionprivate Result[] updateNumberOfCompleteResultsAndReturn(Result... results)
public Result[] addAndGet(Result[] results, boolean isHeartbeatMessage) throws IOException
ScanResultCacheaddAndGet in interface ScanResultCacheresults - the results of a scan next. Must not be null.isHeartbeatMessage - indicate whether the results is gotten from a heartbeat response.IOExceptionpublic void clear()
ScanResultCacheclear in interface ScanResultCachepublic int numberOfCompleteRows()
ScanResultCachenumberOfCompleteRows in interface ScanResultCacheCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.