Class BatchingCallable<RequestT,ResponseT> (2.21.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

NameDescription
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
NameDescription
callableUnaryCallable<RequestT,ResponseT>
batchingDescriptorBatchingDescriptor<RequestT,ResponseT>
batcherFactoryBatcherFactory<RequestT,ResponseT>

Methods

futureCall(RequestT request, ApiCallContext context)

public ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext context)

Perform a call asynchronously.

Parameters
NameDescription
requestRequestT
contextApiCallContext
Returns
TypeDescription
ApiFuture<ResponseT>
Overrides