public static final class ScanEnhancedRequest.Builder extends Object
Modifier and Type | Method and Description |
---|---|
ScanEnhancedRequest |
build() |
ScanEnhancedRequest.Builder |
consistentRead(Boolean consistentRead)
Determines the read consistency model: If set to true, the operation uses strongly consistent reads; otherwise,
the operation uses eventually consistent reads.
|
ScanEnhancedRequest.Builder |
exclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
The primary key of the first item that this operation will evaluate.
|
ScanEnhancedRequest.Builder |
filterExpression(Expression filterExpression)
Refines the scan results by applying the filter expression on the results returned
from the scan and discards items that do not match.
|
ScanEnhancedRequest.Builder |
limit(Integer limit)
Sets a limit on how many items to evaluate in the scan.
|
public ScanEnhancedRequest.Builder exclusiveStartKey(Map<String,AttributeValue> exclusiveStartKey)
Page.lastEvaluatedKey()
in the previous operation.exclusiveStartKey
- the primary key value where DynamoDb should start to evaluate itemspublic ScanEnhancedRequest.Builder limit(Integer limit)
Note:The limit does not refer to the number of items to return, but how many items
the database should evaluate while executing the scan. Use limit together with Page.lastEvaluatedKey()
and exclusiveStartKey
in subsequent scan calls to evaluate limit items per call.
limit
- the maximum number of items to evalutepublic ScanEnhancedRequest.Builder consistentRead(Boolean consistentRead)
By default, the value of this property is set to false.
consistentRead
- sets consistency model of the operation to use strong consistency if truepublic ScanEnhancedRequest.Builder filterExpression(Expression filterExpression)
Expression
for examples
and constraints.
Note: Using the filter expression does not reduce the cost of the scan, since it is applied after the database has found matching items.
filterExpression
- an expression that filters results of evaluating the scanpublic ScanEnhancedRequest build()
Copyright © 2020. All rights reserved.