@InternalApi public class Batch<RequestT,ResponseT> extends Object
A Batch contains a single UnaryCallable object, which will be used to make the API
call, and a list of BatchedRequestIssuer objects, which represent the individual requests
in the batch.
Additional batches can be merged into an existing batch using the merge(Batch)
method. Request objects are combined using a RequestBuilder into a single request.
This is public only for technical reasons, for advanced usage.
| Constructor and Description |
|---|
Batch(BatchingDescriptor<RequestT,ResponseT> descriptor,
RequestT request,
UnaryCallable<RequestT,ResponseT> callable,
BatchedFuture<ResponseT> batchedFuture) |
| Modifier and Type | Method and Description |
|---|---|
long |
getByteCount() |
UnaryCallable<RequestT,ResponseT> |
getCallable() |
RequestT |
getRequest() |
List<BatchedRequestIssuer<ResponseT>> |
getRequestIssuerList() |
void |
merge(Batch<RequestT,ResponseT> batch)
Merge the given batch into this batch.
|
public Batch(BatchingDescriptor<RequestT,ResponseT> descriptor, RequestT request, UnaryCallable<RequestT,ResponseT> callable, BatchedFuture<ResponseT> batchedFuture)
public RequestT getRequest()
public UnaryCallable<RequestT,ResponseT> getCallable()
public List<BatchedRequestIssuer<ResponseT>> getRequestIssuerList()
public long getByteCount()