public class BatchUpdater extends Object
| Modifier and Type | Field and Description |
|---|---|
protected boolean |
cancel
Provides a mean to cancel Batch Operator from doing any more work.
|
protected com.microsoft.azure.documentdb.DocumentClient |
client
The document client to use.
|
AtomicInteger |
numberOfDocumentsUpdated
The count of documents bulk updated by this batch updater.
|
protected static com.fasterxml.jackson.databind.ObjectMapper |
objectMapper |
protected String |
partitionKeyRangeId
The index of the physical partition this batch operator is responsible for.
|
protected com.microsoft.azure.documentdb.RequestOptions |
requestOptions
Request options specifying the underlying partition key range id.
|
com.google.common.util.concurrent.AtomicDouble |
totalRequestUnitsConsumed
The total request units consumed by this batch updater.
|
| Constructor and Description |
|---|
BatchUpdater(String partitionKeyRangeId,
List<List<UpdateItem>> batchesToUpdate,
com.microsoft.azure.documentdb.DocumentClient client,
String bulkUpdateSprocLink,
String partitionKeyProperty) |
| Modifier and Type | Method and Description |
|---|---|
List<BulkUpdateFailure> |
getBulkUpdateFailures() |
List<UpdateItem> |
getDocumentsFailedToUpdateDueToSplits() |
int |
getNumberOfDocumentsUpdated() |
double |
getTotalRequestUnitsConsumed() |
Iterator<Callable<com.microsoft.azure.documentdb.bulkexecutor.internal.OperationMetrics>> |
miniBatchExecutionCallableIterator()
Gets a stream of tasks that return InsertMetrics that when awaited on operate on the next mini-batch to the document collection.
|
public AtomicInteger numberOfDocumentsUpdated
public com.google.common.util.concurrent.AtomicDouble totalRequestUnitsConsumed
protected static final com.fasterxml.jackson.databind.ObjectMapper objectMapper
protected String partitionKeyRangeId
protected com.microsoft.azure.documentdb.DocumentClient client
protected volatile boolean cancel
protected com.microsoft.azure.documentdb.RequestOptions requestOptions
public int getNumberOfDocumentsUpdated()
public double getTotalRequestUnitsConsumed()
public List<UpdateItem> getDocumentsFailedToUpdateDueToSplits()
public List<BulkUpdateFailure> getBulkUpdateFailures()
public Iterator<Callable<com.microsoft.azure.documentdb.bulkexecutor.internal.OperationMetrics>> miniBatchExecutionCallableIterator()
Copyright © 2019. All rights reserved.