Batch.Builder

public final class Batch.Builder


Builder for Batch objects. Note that this class is not thread-safe, by design.

Summary

Public constructors

Builder(GoogleApiClient googleApiClient)

Public methods

BatchResultToken<R>
<R extends Result> add(PendingResult<R> pendingResult)

Adds a PendingResult to the batch.

Batch

Public constructors

Builder

public Builder(GoogleApiClient googleApiClient)

Public methods

add

public BatchResultToken<R> <R extends Result> add(PendingResult<R> pendingResult)

Adds a PendingResult to the batch. The returned token can be used to retrieve the result from the BatchResult passed to the result callback.

Parameters
PendingResult<R> pendingResult

Items to wait for completion of.

Returns
BatchResultToken<R>

The result token to use to get the result from the BatchResult.

build

public Batch build()