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.ScanController
This 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.ScanController
public void terminate()
AdvancedScanResultConsumer.ScanController
This 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.ScanController
public Optional<Cursor> cursor()
AdvancedScanResultConsumer.ScanController
cursor
in interface AdvancedScanResultConsumer.ScanController
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.