TableBatchOperation Class
Definition
- java.lang.Object
- java.util.ArrayList<TableOperation>
- com.microsoft.azure.storage.table.TableBatchOperation
A class which represents a batch operation. A batch operation is a collection of table operations which are executed by the Storage Service REST API as a single atomic operation, by invoking an Entity Group Transaction.
A batch operation may contain up to 100 individual table operations, with the requirement that each operation entity must have same partition key. A batch with a retrieve operation cannot contain any other operations. Note that the total payload of a batch operation is limited to 4MB.
public class TableBatchOperation
Methods
| add(final int index, final TableOperation element) |
Adds the table operation at the specified index in the batch operation . |
| add(final TableOperation element) |
Adds the table operation to the batch operation . |
| addAll(final int index, final java.util.Collection<? extends TableOperation> c) |
Adds the collection of table operations to the batch operation starting at the specified index. |
| addAll(final java.util.Collection<? extends TableOperation> c) |
Adds the collection of table operations to the batch operation . |
| clear() |
Clears all table operations from the batch operation. |
| delete(final TableEntity entity) |
Adds a table operation to delete the specified entity to the batch operation. |
| execute(final CloudTableClient client, final String tableName, final TableRequestOptions options, final OperationContext opContext) |
Reserved for internal use. Executes this batch operation on the specified table, using the specified TableRequestOptions and OperationContext. This method will invoke the Storage Service REST API to execute this batch operation, using the Table service endpoint and storage account credentials in the CloudTableClient object. |
| insert(final TableEntity entity) |
Adds a table operation to insert the specified entity to the batch operation. |
| insert(final TableEntity entity, boolean echoContent) |
Adds a table operation to insert the specified entity to the batch operation. |
| insertOrMerge(final TableEntity entity) |
Adds a table operation to insert or merge the specified entity to the batch operation. |
| insertOrReplace(final TableEntity entity) |
Adds a table operation to insert or replace the specified entity to the batch operation. |
| merge(final TableEntity entity) |
Adds a table operation to merge the specified entity to the batch operation. |
| remove(int index) |
Removes the table operation at the specified index from the batch operation. |
| remove(Object o) |
Removes the specified from the batch operation. |
| removeAll(java.util.Collection<?> c) |
Removes all elements of the specified collection from the batch operation. |
| removeRange(int fromIndex, int toIndex) |
Reserved for internal use. Removes all the table operations at indexes in the specified range from the batch operation . |
| replace(final TableEntity entity) |
Adds a table operation to replace the specified entity to the batch operation. |
| retrieve(final String partitionKey, final String rowKey, final Class<? extends TableEntity> clazzType) |
Adds a table operation to retrieve an entity of the specified class type with the specified PartitionKey and RowKey to the batch operation. |
| retrieve(final String partitionKey, final String rowKey, final EntityResolver<?> resolver) |
Adds a table operation to retrieve an entity of the specified class type with the specified PartitionKey and RowKey to the batch operation. |