@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
IOException
private Result[] prependCombined(Result[] results, int length) throws IOException
IOException
private Result[] updateNumberOfCompleteResultsAndReturn(Result... results)
public Result[] addAndGet(Result[] results, boolean isHeartbeatMessage) throws IOException
ScanResultCache
addAndGet
in interface ScanResultCache
results
- the results of a scan next. Must not be null.isHeartbeatMessage
- indicate whether the results is gotten from a heartbeat response.IOException
public void clear()
ScanResultCache
clear
in interface ScanResultCache
public int numberOfCompleteRows()
ScanResultCache
numberOfCompleteRows
in interface ScanResultCache
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.