private final class AsyncScanSingleRegionRpcRetryingCaller.ScanControllerImpl extends Object implements AdvancedScanResultConsumer.ScanController
| Modifier and Type | Field and Description |
|---|---|
private Thread |
callerThread |
private Optional<Cursor> |
cursor |
private AsyncScanSingleRegionRpcRetryingCaller.ScanResumerImpl |
resumer |
private AsyncScanSingleRegionRpcRetryingCaller.ScanControllerState |
state |
| Constructor and Description |
|---|
ScanControllerImpl(Optional<Cursor> cursor) |
| Modifier and Type | Method and Description |
|---|---|
Optional<Cursor> |
cursor()
Get the scan cursor if available.
|
(package private) AsyncScanSingleRegionRpcRetryingCaller.ScanControllerState |
destroy() |
private void |
preCheck() |
AdvancedScanResultConsumer.ScanResumer |
suspend()
Suspend the scan.
|
void |
terminate()
Terminate the scan.
|
private final Thread callerThread
private AsyncScanSingleRegionRpcRetryingCaller.ScanResumerImpl resumer
public ScanControllerImpl(Optional<Cursor> cursor)
private void preCheck()
public AdvancedScanResultConsumer.ScanResumer suspend()
AdvancedScanResultConsumer.ScanControllerThis means we will stop fetching data in background, i.e., will not call onNext any more before you resume the scan.
suspend in interface AdvancedScanResultConsumer.ScanControllerpublic void terminate()
AdvancedScanResultConsumer.ScanControllerThis is useful when you have got enough results and want to stop the scan in onNext method, or you want to stop the scan in onHeartbeat method because it has spent too many time.
terminate in interface AdvancedScanResultConsumer.ScanControllerpublic Optional<Cursor> cursor()
AdvancedScanResultConsumer.ScanControllercursor in interface AdvancedScanResultConsumer.ScanControllerCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.