BatchOperation<C,P,R> Class

  • java.lang.Object
    • Iterable<Map.Entry<StorageRequest<C, P, R>, P>>
      • com.microsoft.azure.storage.BatchOperation<C,P,R>

Type Parameters

C

The ServiceClient type of the Storage service this batch targets.

P

The type of the parent object making the REST call.

R

The return type of the individual requests on the batch.

public class BatchOperation<C extends ServiceClient,P,R>

A collection of operations to be sent as a batch request. Maintains the order of requests as added to the batch.

Method Summary

Modifier and Type Method and Description
final void addSubOperation(final StorageRequest<C, P, R> request, final P parent)

Adds an operation to the subOperations collection.

StorageRequest<C, BatchOperation<C, P, R>, Map<P, R>> batchImpl(C client, final RequestOptions requestOptions)

Creates a StorageRequest for a batch operation based on this object's collected requests to make.

abstract R convertResponse(BatchSubResponse response)

Converts a batch sub-response from it's basic HTTP form to the response type of the operation being batched.

UUID getBatchId()
Iterator<Map.Entry<StorageRequest<C, P, R>, P>> iterator()

Method Details

addSubOperation

protected final void addSubOperation(final StorageRequest request, final P parent)

Adds an operation to the subOperations collection.

Parameters:

request - The request to add.
parent

Throws:

IllegalArgumentException - Throws if this batch is already at max subOperations size. See BATCH_MAX_REQUESTS.

batchImpl

protected StorageRequest, Map> batchImpl(C client, final RequestOptions requestOptions)

Creates a StorageRequest for a batch operation based on this object's collected requests to make.

Parameters:

client - The ServiceClient making this request.
requestOptions - Request options for this request.

Returns:

The built request.

convertResponse

protected abstract R convertResponse(BatchSubResponse response)

Converts a batch sub-response from it's basic HTTP form to the response type of the operation being batched.

Parameters:

response - Object model of the HTTP response.

Returns:

Parsed response.

getBatchId

public UUID getBatchId()

iterator

public Iterator, P>> iterator()

Applies to