你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

BatchUpdater Class

  • java.lang.Object
    • com.microsoft.azure.documentdb.bulkexecutor.internal.BatchOperator
      • com.microsoft.azure.documentdb.bulkexecutor.internal.BatchUpdater

public class BatchUpdater
extends com.microsoft.azure.documentdb.bulkexecutor.internal.BatchOperator

Field Summary

Modifier and Type Field and Description
java.util.concurrent.atomic.AtomicInteger numberOfDocumentsUpdated

The count of documents bulk updated by this batch updater.

com.google.common.util.concurrent.AtomicDouble totalRequestUnitsConsumed

The total request units consumed by this batch updater.

Constructor Summary

Constructor Description
BatchUpdater(String partitionKeyRangeId, List<List<UpdateItem>> batchesToUpdate, DocumentClient client, String bulkUpdateSprocLink, String partitionKeyProperty)

Method Summary

Modifier and Type Method and Description
java.util.List<BulkUpdateFailure> getBulkUpdateFailures()
java.util.List<UpdateItem> getDocumentsFailedToUpdateDueToSplits()
int getNumberOfDocumentsUpdated()
double getTotalRequestUnitsConsumed()
java.util.Iterator<java.util.concurrent.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.

Methods inherited from com.microsoft.azure.documentdb.bulkexecutor.internal.BatchOperator

com.microsoft.azure.documentdb.bulkexecutor.internal.BatchOperator.miniBatchExecutionCallableIterator

Methods inherited from java.lang.Object

java.lang.Object.clone java.lang.Object.equals java.lang.Object.finalize java.lang.Object.getClass java.lang.Object.hashCode java.lang.Object.notify java.lang.Object.notifyAll java.lang.Object.toString java.lang.Object.wait java.lang.Object.wait java.lang.Object.wait

Field Details

numberOfDocumentsUpdated

public AtomicInteger numberOfDocumentsUpdated

The count of documents bulk updated by this batch updater.

totalRequestUnitsConsumed

public AtomicDouble totalRequestUnitsConsumed

The total request units consumed by this batch updater.

Constructor Details

BatchUpdater

public BatchUpdater(String partitionKeyRangeId, List> batchesToUpdate, DocumentClient client, String bulkUpdateSprocLink, String partitionKeyProperty)

Parameters:

partitionKeyRangeId
batchesToUpdate
client
bulkUpdateSprocLink
partitionKeyProperty

Method Details

getBulkUpdateFailures

public List getBulkUpdateFailures()

getDocumentsFailedToUpdateDueToSplits

public List getDocumentsFailedToUpdateDueToSplits()

getNumberOfDocumentsUpdated

public int getNumberOfDocumentsUpdated()

getTotalRequestUnitsConsumed

public double getTotalRequestUnitsConsumed()

miniBatchExecutionCallableIterator

public Iterator> miniBatchExecutionCallableIterator()

Gets a stream of tasks that return InsertMetrics that when awaited on operate on the next mini-batch to the document collection.

Overrides:

BatchUpdater.miniBatchExecutionCallableIterator()

Applies to