Package com.google.api.gax.rpc
Class Batch<RequestT,ResponseT>
- java.lang.Object
-
- com.google.api.gax.rpc.Batch<RequestT,ResponseT>
-
@InternalApi public class Batch<RequestT,ResponseT> extends java.lang.ObjectA Batch contains a collection of requests that are to be batched into a single API call.A Batch contains a single
UnaryCallableobject, which will be used to make the API call, and a list ofBatchedRequestIssuerobjects, 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 aRequestBuilderinto a single request.This is public only for technical reasons, for advanced usage.
-
-
Constructor Summary
Constructors Constructor Description Batch(BatchingDescriptor<RequestT,ResponseT> descriptor, RequestT request, UnaryCallable<RequestT,ResponseT> callable, BatchedFuture<ResponseT> batchedFuture)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longgetByteCount()UnaryCallable<RequestT,ResponseT>getCallable()RequestTgetRequest()java.util.List<BatchedRequestIssuer<ResponseT>>getRequestIssuerList()voidmerge(Batch<RequestT,ResponseT> batch)Merge the given batch into this batch.
-
-
-
Constructor Detail
-
Batch
public Batch(BatchingDescriptor<RequestT,ResponseT> descriptor, RequestT request, UnaryCallable<RequestT,ResponseT> callable, BatchedFuture<ResponseT> batchedFuture)
-
-
Method Detail
-
getRequest
public RequestT getRequest()
-
getCallable
public UnaryCallable<RequestT,ResponseT> getCallable()
-
getRequestIssuerList
public java.util.List<BatchedRequestIssuer<ResponseT>> getRequestIssuerList()
-
getByteCount
public long getByteCount()
-
-