Class ScanEnhancedRequest.Builder
- Enclosing class:
- ScanEnhancedRequest
- 
Method SummaryModifier and TypeMethodDescriptionaddAttributeToProject(String attributeToProject) Adds a single attribute name to be retrieved from the database.addNestedAttributesToProject(Collection<NestedAttributeName> nestedAttributeNames) Adds a collection of nested attributes to be retrieved from the database.addNestedAttributesToProject(NestedAttributeName... nestedAttributeNames) Adds a collection of nested attributes to be retrieved from the database.addNestedAttributeToProject(NestedAttributeName nestedAttributeName) Adds a single nested attribute to be retrieved from the database.attributesToProject(String... attributesToProject) Sets one or more attribute names to be retrieved from the database.attributesToProject(Collection<String> attributesToProject) Sets a collection of the attribute names to be retrieved from the database.build()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.exclusiveStartKey(Map<String, AttributeValue> exclusiveStartKey) The primary key of the first item that this operation will evaluate.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.Sets a limit on how many items to evaluate in the scan.returnConsumedCapacity(String returnConsumedCapacity) Whether to return the capacity consumed by this operation.returnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity) Whether to return the capacity consumed by this operation.For a parallel Scan request, Segment identifies an individual segment to be scanned by an application worker.Determines the attributes to be returned in the result.totalSegments(Integer totalSegments) For a parallel Scan request, TotalSegments represents the total number of segments into which the Scan operation will be divided.
- 
Method Details- 
exclusiveStartKeyThe primary key of the first item that this operation will evaluate. By default, the operation will evaluate the whole dataset. If used, normally this parameter is populated with the value that was returned forPage.lastEvaluatedKey()in the previous operation.- Parameters:
- exclusiveStartKey- the primary key value where DynamoDb should start to evaluate items
- Returns:
- a builder of this type
 
- 
limitSets a limit on how many items to evaluate in the scan. If not set, the operation uses the maximum values allowed.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()andexclusiveStartKeyin subsequent scan calls to evaluate limit items per call.- Parameters:
- limit- the maximum number of items to evalute
- Returns:
- a builder of this type
 
- 
segmentFor a parallel Scan request, Segment identifies an individual segment to be scanned by an application worker.Note:Segment IDs are zero-based, so the first segment is always 0. For example, if you want to use four application threads to scan a table or an index, then the first thread specifies a Segment value of 0, the second thread specifies 1, and so on. The value for Segment must be greater than or equal to 0, and less than the value provided for TotalSegments. If you provide Segment, you must also provide TotalSegments. - Parameters:
- segment- identifies an individual segment to be scanned
- Returns:
- a builder of this type
 
- 
totalSegmentsFor a parallel Scan request, TotalSegments represents the total number of segments into which the Scan operation will be divided.Note:If you do not specify this value, the TotalSegements is effectively 1 and Scan operation will be sequential rather than parallel. If you specify TotalSegments, you must also specify Segment. If you specify TotalSegments of 2 and above, you can create separate thread for each segment and scan items in parallel across segments from multiple threads. - Parameters:
- totalSegments- the total number of segments to divide the table.
- Returns:
- a builder of this type
 
- 
consistentReadDetermines the read consistency model: If set to true, the operation uses strongly consistent reads; otherwise, the operation uses eventually consistent reads.By default, the value of this property is set to false. - Parameters:
- consistentRead- sets consistency model of the operation to use strong consistency if true
- Returns:
- a builder of this type
 
- 
filterExpressionRefines the scan results by applying the filter expression on the results returned from the scan and discards items that do not match. SeeExpressionfor 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. - Parameters:
- filterExpression- an expression that filters results of evaluating the scan
- Returns:
- a builder of this type
 
- 
selectDetermines the attributes to be returned in the result. SeeSelectfor examples and constraints. By default, all attributes are returned.- Parameters:
- select-
- Returns:
- a builder of this type
 
- 
attributesToProjectSets a collection of the attribute names to be retrieved from the database. These attributes can include scalars, sets, or elements of a JSON document. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result. If there are nested attributes, use any of the addNestedAttributesToProject methods, such as addNestedAttributesToProject(NestedAttributeName...).For more information, see Accessing Item Attributes in the Amazon DynamoDB Developer Guide. - Parameters:
- attributesToProject- A collection of the attributes names to be retrieved from the database.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
 
- 
attributesToProjectSets one or more attribute names to be retrieved from the database. These attributes can include scalars, sets, or elements of a JSON document. If no attribute names are specified, then all attributes will be returned. If any of the requested attributes are not found, they will not appear in the result. If there are nested attributes, use any of the addNestedAttributesToProject methods, such as addNestedAttributesToProject(NestedAttributeName...).For more information, see Accessing Item Attributes in the Amazon DynamoDB Developer Guide. - Parameters:
- attributesToProject- One or more attributes names to be retrieved from the database.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
 
- 
addAttributeToProjectAdds a single attribute name to be retrieved from the database. This attribute can include scalars, sets, or elements of a JSON document. If there are nested attributes, use any of the addNestedAttributesToProject methods, such as addNestedAttributesToProject(NestedAttributeName...).- Parameters:
- attributeToProject- An additional single attribute name to be retrieved from the database.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
 
- 
addNestedAttributesToProjectpublic ScanEnhancedRequest.Builder addNestedAttributesToProject(Collection<NestedAttributeName> nestedAttributeNames) Adds a collection of nested attributes to be retrieved from the database. These attributes can include scalars, sets, or elements of a JSON document.This method is additive, so calling it multiple times will add to the list of nested attribute names. - Parameters:
- nestedAttributeNames- A collection of attributes to be retrieved from the database.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
 
- 
addNestedAttributesToProjectpublic ScanEnhancedRequest.Builder addNestedAttributesToProject(NestedAttributeName... nestedAttributeNames) Adds a collection of nested attributes to be retrieved from the database. These attributes can include scalars, sets, or elements of a JSON document.This method is additive, so calling it multiple times will add to the list of nested attribute names. - Parameters:
- nestedAttributeNames- A collection of attributes to be retrieved from the database.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
 
- 
addNestedAttributeToProjectpublic ScanEnhancedRequest.Builder addNestedAttributeToProject(NestedAttributeName nestedAttributeName) Adds a single nested attribute to be retrieved from the database. The attribute can include scalars, sets, or elements of a JSON document.This method is additive, so calling it multiple times will add to the list of nested attribute names. - Parameters:
- nestedAttributeName- A single attribute name to be retrieved from the database.
- Returns:
- Returns a reference to this object so that method calls can be chained together.
- See Also:
 
- 
returnConsumedCapacitypublic ScanEnhancedRequest.Builder returnConsumedCapacity(ReturnConsumedCapacity returnConsumedCapacity) Whether to return the capacity consumed by this operation.- See Also:
 
- 
returnConsumedCapacityWhether to return the capacity consumed by this operation.- See Also:
 
- 
build
 
-