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>
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.
-
Constructor Summary
ConstructorsConstructorDescriptionBatchingCallable(UnaryCallable<RequestT, ResponseT> callable, BatchingDescriptor<RequestT, ResponseT> batchingDescriptor, BatcherFactory<RequestT, ResponseT> batcherFactory) -
Method Summary
Modifier and TypeMethodDescriptionfutureCall(RequestT request, ApiCallContext context) Perform a call asynchronously.Methods inherited from class com.google.api.gax.rpc.UnaryCallable
call, call, futureCall, withDefaultCallContext
-
Constructor Details
-
BatchingCallable
public BatchingCallable(UnaryCallable<RequestT, ResponseT> callable, BatchingDescriptor<RequestT, ResponseT> batchingDescriptor, BatcherFactory<RequestT, ResponseT> batcherFactory)
-
-
Method Details
-
futureCall
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
-