Package com.google.api.gax.rpc
Class BatchingCallable<RequestT,ResponseT>
- java.lang.Object
-
- com.google.api.gax.rpc.UnaryCallable<RequestT,ResponseT>
-
- com.google.api.gax.rpc.BatchingCallable<RequestT,ResponseT>
-
@InternalApi("For use by transport-specific implementations") public class BatchingCallable<RequestT,ResponseT> extends UnaryCallable<RequestT,ResponseT>AUnaryCallablewhich 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 Summary
Constructors Constructor Description BatchingCallable(UnaryCallable<RequestT,ResponseT> callable, BatchingDescriptor<RequestT,ResponseT> batchingDescriptor, BatcherFactory<RequestT,ResponseT> batcherFactory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.api.core.ApiFuture<ResponseT>futureCall(RequestT request, ApiCallContext context)Perform a call asynchronously.-
Methods inherited from class com.google.api.gax.rpc.UnaryCallable
call, call, futureCall, withDefaultCallContext
-
-
-
-
Constructor Detail
-
BatchingCallable
public BatchingCallable(UnaryCallable<RequestT,ResponseT> callable, BatchingDescriptor<RequestT,ResponseT> batchingDescriptor, BatcherFactory<RequestT,ResponseT> batcherFactory)
-
-
Method Detail
-
futureCall
public com.google.api.core.ApiFuture<ResponseT> futureCall(RequestT request, ApiCallContext context)
Description copied from class:UnaryCallablePerform a call asynchronously.- Specified by:
futureCallin classUnaryCallable<RequestT,ResponseT>context-ApiCallContextto make the call with- Returns:
ApiFuturefor the call result
-
-