Interface IDynamoTableBatchGetItems
Interface to specify the BatchGetItems operation with mixed record types.
Namespace: LambdaSharp.DynamoDB.Native.Operations
Assembly: LambdaSharp.DynamoDB.Native.dll
Syntax
public interface IDynamoTableBatchGetItems
Methods
BeginGetItem<TRecord>(DynamoPrimaryKey<TRecord>, Boolean)
Begin specification of a GetItem operation for BatchGetItems.
Declaration
IDynamoTableBatchGetItemsGetItem<TRecord> BeginGetItem<TRecord>(DynamoPrimaryKey<TRecord> primaryKey, bool consistentRead = false)
where TRecord : class
Parameters
Type | Name | Description |
---|---|---|
DynamoPrimaryKey<TRecord> | primaryKey | Primary key of the item to retrieve. |
System.Boolean | consistentRead | Boolean indicating if the read operation should be performed against the main partition (2x cost compared to eventual consistent read). |
Returns
Type | Description |
---|---|
IDynamoTableBatchGetItemsGetItem<TRecord> |
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |
ExecuteAsync(Int32, CancellationToken)
Execute the BatchGetItems operation.
Declaration
Task<IEnumerable<object>> ExecuteAsync(int maxAttempts = 5, CancellationToken cancellationToken = default(CancellationToken))
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxAttempts | Maximum number of attempts with exponential back when encountering provisioned throughput is exceeded. |
System.Threading.CancellationToken | cancellationToken | A cancellation token that can be used by other objects or threads to receive notice of cancellation. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Collections.Generic.IEnumerable<System.Object>> | List of found items. |
Exceptions
Type | Condition |
---|---|
DynamoTableBatchGetItemsMaxAttemptsExceededException | Thrown when the maximum number of attempts is exceeded. |
GetItem<TRecord>(DynamoPrimaryKey<TRecord>, Boolean)
Add a GetItem operation to BatchGetItems that retrieves all attributes for the given primary key.
This method is the same: BeginGetItem(primaryKey, consistentRead).End()
.
Declaration
virtual IDynamoTableBatchGetItems GetItem<TRecord>(DynamoPrimaryKey<TRecord> primaryKey, bool consistentRead = false)
where TRecord : class
Parameters
Type | Name | Description |
---|---|---|
DynamoPrimaryKey<TRecord> | primaryKey | Primary key of the item to retrieve. |
System.Boolean | consistentRead | Boolean indicating if the read operation should be performed against the main partition (2x cost compared to eventual consistent read). |
Returns
Type | Description |
---|---|
IDynamoTableBatchGetItems |
Type Parameters
Name | Description |
---|---|
TRecord | The record type. |