public static class DynamoDBMapperConfig.DefaultBatchWriteRetryStrategy extends Object implements DynamoDBMapperConfig.BatchWriteRetryStrategy
Modifier and Type | Field and Description |
---|---|
static DynamoDBMapperConfig.DefaultBatchWriteRetryStrategy |
INSTANCE |
Constructor and Description |
---|
DefaultBatchWriteRetryStrategy()
Keep retrying until success, with default backoff.
|
DefaultBatchWriteRetryStrategy(int maxRetry) |
Modifier and Type | Method and Description |
---|---|
DynamoDBMapperConfig |
config() |
long |
getDelayBeforeRetryUnprocessedItems(Map<String,List<WriteRequest>> unprocessedItems,
int retriesAttempted)
Returns the delay (in milliseconds) before retrying on
UnprocessedItems.
|
int |
getMaxRetryOnUnprocessedItems(Map<String,List<WriteRequest>> batchWriteItemInput)
Returns the max number of retries to be performed if the service
returns UnprocessedItems in the response.
|
public static final DynamoDBMapperConfig.DefaultBatchWriteRetryStrategy INSTANCE
public DefaultBatchWriteRetryStrategy()
public DefaultBatchWriteRetryStrategy(int maxRetry)
public int getMaxRetryOnUnprocessedItems(Map<String,List<WriteRequest>> batchWriteItemInput)
DynamoDBMapperConfig.BatchWriteRetryStrategy
getMaxRetryOnUnprocessedItems
in interface DynamoDBMapperConfig.BatchWriteRetryStrategy
batchWriteItemInput
- the one batch of write requests that is being sent to the
BatchWriteItem API.public long getDelayBeforeRetryUnprocessedItems(Map<String,List<WriteRequest>> unprocessedItems, int retriesAttempted)
DynamoDBMapperConfig.BatchWriteRetryStrategy
getDelayBeforeRetryUnprocessedItems
in interface DynamoDBMapperConfig.BatchWriteRetryStrategy
unprocessedItems
- the UnprocessedItems returned by the service in the last
BatchWriteItem callretriesAttempted
- The number of times we have attempted to resend
UnprocessedItems.public final DynamoDBMapperConfig config()
Copyright © 2020. All rights reserved.