@InternalApi(value="For use by transport-specific implementations") public class BatchingCallable<RequestT,ResponseT> extends UnaryCallable<RequestT,ResponseT>
UnaryCallable which will batch requests based on the given BatchingDescriptor and
BatcherFactory. The BatcherFactory provides a distinct Batcher for each partition as specified by
the BatchingDescriptor. An example of a batching partition would be a pubsub topic.
This is public only for technical reasons, for advanced usage.
| Constructor and Description |
|---|
BatchingCallable(UnaryCallable<RequestT,ResponseT> callable,
BatchingDescriptor<RequestT,ResponseT> batchingDescriptor,
BatcherFactory<RequestT,ResponseT> batcherFactory) |
| Modifier and Type | Method and Description |
|---|---|
com.google.api.core.ApiFuture<ResponseT> |
futureCall(RequestT request,
ApiCallContext context)
Perform a call asynchronously.
|
call, call, futureCall, withDefaultCallContextpublic BatchingCallable(UnaryCallable<RequestT,ResponseT> callable, BatchingDescriptor<RequestT,ResponseT> batchingDescriptor, BatcherFactory<RequestT,ResponseT> batcherFactory)
public com.google.api.core.ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext context)
UnaryCallablefutureCall in class UnaryCallable<RequestT,ResponseT>context - ApiCallContext to make the call withApiFuture for the call result