Class NoLimitScannerContext
java.lang.Object
org.apache.hadoop.hbase.regionserver.ScannerContext
org.apache.hadoop.hbase.regionserver.NoLimitScannerContext
This is a special 
ScannerContext subclass that is designed to be used globally when
 limits should not be enforced during invocations of InternalScanner.next(java.util.List)
 or InternalScanner.next(java.util.List).
 
 Instances of NoLimitScannerContext are immutable after construction. Any attempt to
 change the limits or progress of a NoLimitScannerContext will fail silently. The net
 effect is that all limit checks will return false, thus indicating that a limit has not been
 reached.
- 
Nested Class SummaryNested classes/interfaces inherited from class org.apache.hadoop.hbase.regionserver.ScannerContextScannerContext.Builder, ScannerContext.LimitScope, ScannerContext.NextState
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprivate static final ScannerContextUse this instance whenever limits do not need to be enforced.Fields inherited from class org.apache.hadoop.hbase.regionserver.ScannerContextkeepProgress, limits, metrics, progress, scannerState, skippingRow
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescription(package private) booleancheckAnyLimitReached(ScannerContext.LimitScope checkerScope) (package private) booleancheckBatchLimit(ScannerContext.LimitScope checkerScope) (package private) booleancheckSizeLimit(ScannerContext.LimitScope checkerScope) (package private) booleancheckTimeLimit(ScannerContext.LimitScope checkerScope) (package private) voidClear away any progress that has been made so far.static final ScannerContextReturns the static, immutable instance ofNoLimitScannerContextto be used whenever limits should not be enforced(package private) voidsetBatchProgress(int batchProgress) (package private) voidsetKeepProgress(boolean keepProgress) (package private) voidsetProgress(int batchProgress, long sizeProgress, long heapSizeProgress) (package private) ScannerContext.NextStateNote that this is not a typical setter.(package private) void(package private) voidsetSizeProgress(long sizeProgress, long heapSizeProgress) (package private) voidMethods inherited from class org.apache.hadoop.hbase.regionserver.ScannerContextgetBatchLimit, getBatchProgress, getBlockSizeProgress, getDataSizeLimit, getDataSizeProgress, getHeapSizeProgress, getKeepProgress, getLastPeekedCell, getMetrics, getSkippingRow, getTimeLimit, hasAnyLimit, hasBatchLimit, hasSizeLimit, hasTimeLimit, incrementBatchProgress, incrementBlockProgress, incrementSizeProgress, isTrackingMetrics, mayHaveMoreCellsInRow, newBuilder, newBuilder, returnImmediately, setLastPeekedCell, setSkippingRow, toString
- 
Field Details- 
NO_LIMITUse this instance whenever limits do not need to be enforced.
 
- 
- 
Constructor Details- 
NoLimitScannerContextpublic NoLimitScannerContext()
 
- 
- 
Method Details- 
getInstanceReturns the static, immutable instance ofNoLimitScannerContextto be used whenever limits should not be enforced
- 
setKeepProgress- Overrides:
- setKeepProgressin class- ScannerContext
 
- 
setBatchProgress- Overrides:
- setBatchProgressin class- ScannerContext
 
- 
setSizeProgress- Overrides:
- setSizeProgressin class- ScannerContext
 
- 
setProgress- Overrides:
- setProgressin class- ScannerContext
 
- 
clearProgressvoid clearProgress()Description copied from class:ScannerContextClear away any progress that has been made so far. All progress fields are reset to initial values. Only clears progress that should reset between rows.ScannerContext.getBlockSizeProgress()is not reset because it increments for all blocks scanned whether the result is included or filtered.- Overrides:
- clearProgressin class- ScannerContext
 
- 
setSizeLimitScope- Overrides:
- setSizeLimitScopein class- ScannerContext
- Parameters:
- scope- The scope in which the size limit will be enforced
 
- 
setTimeLimitScope- Overrides:
- setTimeLimitScopein class- ScannerContext
- Parameters:
- scope- The scope in which the time limit will be enforced
 
- 
setScannerStateDescription copied from class:ScannerContextNote that this is not a typical setter. This setter returns theScannerContext.NextStatethat was passed in so that methods can be invoked against the new state. Furthermore, this pattern allows theNoLimitScannerContextto cleanly override this setter and simply return the new state, thus preserving the immutability ofNoLimitScannerContext- Overrides:
- setScannerStatein class- ScannerContext
- Returns:
- The state that was passed in.
 
- 
checkBatchLimit- Overrides:
- checkBatchLimitin class- ScannerContext
- Parameters:
- checkerScope- The scope that the limit is being checked from
- Returns:
- true when the limit is enforceable from the checker's scope and it has been reached
 
- 
checkSizeLimit- Overrides:
- checkSizeLimitin class- ScannerContext
- Parameters:
- checkerScope- The scope that the limit is being checked from
- Returns:
- true when the limit is enforceable from the checker's scope and it has been reached
 
- 
checkTimeLimit- Overrides:
- checkTimeLimitin class- ScannerContext
- Parameters:
- checkerScope- The scope that the limit is being checked from. The time limit is always checked against- EnvironmentEdgeManager.currentTime
- Returns:
- true when the limit is enforceable from the checker's scope and it has been reached
 
- 
checkAnyLimitReached- Overrides:
- checkAnyLimitReachedin class- ScannerContext
- Parameters:
- checkerScope- The scope that the limits are being checked from
- Returns:
- true when some limit is enforceable from the checker's scope and it has been reached
 
 
-