public final class TableAsyncBatch extends Object
TableAsyncClient.createBatch(String) method on a TableAsyncClient object.| Modifier and Type | Method and Description |
|---|---|
TableAsyncBatch |
createEntity(TableEntity entity)
Inserts an entity into the table.
|
TableAsyncBatch |
deleteEntity(String rowKey)
Deletes an entity from the table.
|
TableAsyncBatch |
deleteEntity(String rowKey,
String eTag)
Deletes an entity from the table.
|
List<com.azure.data.tables.implementation.models.BatchOperation> |
getOperations()
Gets an immutable list containing all operations added to this batch.
|
Mono<List<BatchOperationResponse>> |
submitTransaction()
Executes all operations within The batch inside a transaction.
|
Mono<com.azure.core.http.rest.Response<List<BatchOperationResponse>>> |
submitTransactionWithResponse()
Executes all operations within The batch inside a transaction.
|
TableAsyncBatch |
updateEntity(TableEntity entity)
Updates an existing entity by merging the provided entity with the existing entity.
|
TableAsyncBatch |
updateEntity(TableEntity entity,
UpdateMode updateMode)
Updates an existing entity using the specified update mode.
|
TableAsyncBatch |
updateEntity(TableEntity entity,
UpdateMode updateMode,
boolean ifUnchanged)
Updates an existing entity using the specified update mode.
|
TableAsyncBatch |
upsertEntity(TableEntity entity)
Inserts an entity into the table if it does not exist, or merges the entity with the existing entity otherwise.
|
TableAsyncBatch |
upsertEntity(TableEntity entity,
UpdateMode updateMode)
Inserts an entity into the table if it does not exist, or updates the existing entity using the specified update
mode otherwise.
|
public TableAsyncBatch createEntity(TableEntity entity)
entity - The entity to insert.TableAsyncBatch.IllegalArgumentException - if the entity's partition key does not match the partition key provided when
creating this TableAsyncBatch object, if the entity's row key is null or empty, or if another
operation with the same row key has already been added to the batch.IllegalStateException - if this method is called after the batch has been submitted.public TableAsyncBatch upsertEntity(TableEntity entity)
entity - The entity to upsert.TableAsyncBatch.IllegalArgumentException - if the entity's partition key does not match the partition key provided when
creating this TableAsyncBatch object, if the entity's row key is null or empty, or if another
operation with the same row key has already been added to the batch.IllegalStateException - if this method is called after the batch has been submitted.public TableAsyncBatch upsertEntity(TableEntity entity, UpdateMode updateMode)
entity - The entity to upsert.updateMode - The type of update to perform if the entity already exits.TableAsyncBatch.IllegalArgumentException - if the entity's partition key does not match the partition key provided when
creating this TableAsyncBatch object, if the entity's row key is null or empty, or if another
operation with the same row key has already been added to the batch.IllegalStateException - if this method is called after the batch has been submitted.public TableAsyncBatch updateEntity(TableEntity entity)
entity - The entity to update.TableAsyncBatch.IllegalArgumentException - if the entity's partition key does not match the partition key provided when
creating this TableAsyncBatch object, if the entity's row key is null or empty, or if another
operation with the same row key has already been added to the batch.IllegalStateException - if this method is called after the batch has been submitted.public TableAsyncBatch updateEntity(TableEntity entity, UpdateMode updateMode)
entity - The entity to update.updateMode - The type of update to perform.TableAsyncBatch.IllegalArgumentException - if the entity's partition key does not match the partition key provided when
creating this TableAsyncBatch object, if the entity's row key is null or empty, or if another
operation with the same row key has already been added to the batch.IllegalStateException - if this method is called after the batch has been submitted.public TableAsyncBatch updateEntity(TableEntity entity, UpdateMode updateMode, boolean ifUnchanged)
entity - The entity to update.updateMode - The type of update to perform.ifUnchanged - When true, the eTag of the provided entity must match the eTag of the entity in the Table
service. If the values do not match, the update will not occur and an exception will be thrown.TableAsyncBatch.IllegalArgumentException - if the entity's partition key does not match the partition key provided when
creating this TableAsyncBatch object, if the entity's row key is null or empty, or if another
operation with the same row key has already been added to the batch.IllegalStateException - if this method is called after the batch has been submitted.public TableAsyncBatch deleteEntity(String rowKey)
rowKey - The row key of the entity.TableAsyncBatch.IllegalArgumentException - if the provided row key is null or empty, or if another operation with
the same row key has already been added to the batch.IllegalStateException - if this method is called after the batch has been submitted.public TableAsyncBatch deleteEntity(String rowKey, String eTag)
rowKey - The row key of the entity.eTag - The value to compare with the eTag of the entity in the Tables service. If the values do not match,
the delete will not occur and an exception will be thrown.TableAsyncBatch.IllegalArgumentException - if the provided row key is null or empty, or if another operation with
the same row key has already been added to the batch.IllegalStateException - if this method is called after the batch has been submitted.public List<com.azure.data.tables.implementation.models.BatchOperation> getOperations()
public Mono<List<BatchOperationResponse>> submitTransaction()
com.azure.data.tables.implementation.models.TableServiceErrorException - if any operation within the batch fails. See the documentation for the client
methods in TableAsyncClient to understand the conditions that may cause a given operation to fail.IllegalStateException - if no operations have been added to the batch.public Mono<com.azure.core.http.rest.Response<List<BatchOperationResponse>>> submitTransactionWithResponse()
com.azure.data.tables.implementation.models.TableServiceErrorException - if any operation within the batch fails. See the documentation for the client
methods in TableAsyncClient to understand the conditions that may cause a given operation to fail.IllegalStateException - if no operations have been added to the batch.Copyright © 2021 Microsoft Corporation. All rights reserved.