public static class CallOptionsFactory.ConfiguredCallOptionsFactory extends Object implements CallOptionsFactory
CallOptions based on a CallOptionsConfig.CallOptionsFactory.ConfiguredCallOptionsFactory, CallOptionsFactory.Default| Constructor and Description |
|---|
ConfiguredCallOptionsFactory(CallOptionsConfig config) |
| Modifier and Type | Method and Description |
|---|---|
<RequestT> io.grpc.CallOptions |
create(io.grpc.MethodDescriptor<RequestT,?> descriptor,
RequestT request)
Provide a
CallOptions object to be used in a single RPC. |
static boolean |
isGet(Object request) |
static <RequestT> boolean |
isLongRequest(io.grpc.MethodDescriptor<RequestT,?> descriptor,
RequestT request) |
public ConfiguredCallOptionsFactory(CallOptionsConfig config)
public <RequestT> io.grpc.CallOptions create(io.grpc.MethodDescriptor<RequestT,?> descriptor,
RequestT request)
CallOptionsFactoryCallOptions object to be used in a single RPC. CallOptions can
contain state, specifically start time with an expiration is set; in cases when timeouts are
used, implementations should create a new CallOptions each time this method is called.create in interface CallOptionsFactoryRequestT - a RequestT object.descriptor - The RPC that's being called. Different methods have different performance
characteristics, so this parameter can be useful to craft the right timeout for the
right method.request - Some methods, specifically ReadRows, can have variability depending on the
request. The request can be for either a single row, or a range. This parameter can be
used to tune timeoutsCallOptions object.public static <RequestT> boolean isLongRequest(io.grpc.MethodDescriptor<RequestT,?> descriptor,
RequestT request)
request - MutateRowsRequest or a ReadRowsRequest that's a
scan.public static boolean isGet(Object request)