public class BatchingCallable<RequestT,ResponseT> extends UnaryCallable<RequestT,ResponseT>A 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.
Type Parameters
| Name | Description |
| RequestT | |
| ResponseT |
Constructors
BatchingCallable(UnaryCallable<RequestT,ResponseT> callable, BatchingDescriptor<RequestT,ResponseT> batchingDescriptor, BatcherFactory<RequestT,ResponseT> batcherFactory)
public BatchingCallable(UnaryCallable<RequestT,ResponseT> callable, BatchingDescriptor<RequestT,ResponseT> batchingDescriptor, BatcherFactory<RequestT,ResponseT> batcherFactory)| Name | Description |
| callable | UnaryCallable<RequestT,ResponseT> |
| batchingDescriptor | BatchingDescriptor<RequestT,ResponseT> |
| batcherFactory | BatcherFactory<RequestT,ResponseT> |
Methods
futureCall(RequestT request, ApiCallContext context)
public ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext context)Perform a call asynchronously.
| Name | Description |
| request | RequestT |
| context | ApiCallContext |
| Type | Description |
| ApiFuture<ResponseT> |