Class BatchingCallable<RequestT,ResponseT> (2.51.0)

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.

Inheritance

java.lang.Object > UnaryCallable > BatchingCallable<RequestT,ResponseT>

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)
Parameters
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.

Parameters
Name Description
request RequestT
context ApiCallContext
Returns
Type Description
ApiFuture<ResponseT>
Overrides