com.google.cloud.bigtable.grpc
Class CallOptionsFactory.ConfiguredCallOptionsFactory
- java.lang.Object
-
- com.google.cloud.bigtable.grpc.CallOptionsFactory.ConfiguredCallOptionsFactory
-
- All Implemented Interfaces:
- CallOptionsFactory
- Enclosing interface:
- CallOptionsFactory
public static class CallOptionsFactory.ConfiguredCallOptionsFactory extends Object implements CallOptionsFactory
Creates a newCallOptions
based on aCallOptionsConfig
.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.google.cloud.bigtable.grpc.CallOptionsFactory
CallOptionsFactory.ConfiguredCallOptionsFactory, CallOptionsFactory.Default
-
-
Constructor Summary
Constructors Constructor and Description ConfiguredCallOptionsFactory(CallOptionsConfig config)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method and Description <RequestT> io.grpc.CallOptions
create(io.grpc.MethodDescriptor<RequestT,?> descriptor, RequestT request)
Creates aCallOptions
with a focus onDeadline
.static boolean
isGet(com.google.bigtable.v2.ReadRowsRequest request)
static boolean
isLongRequest(Object request)
Deprecated.Please usegetRequestTimeout(Object)
to fetch long requests timeout.
-
-
-
Constructor Detail
-
ConfiguredCallOptionsFactory
public ConfiguredCallOptionsFactory(CallOptionsConfig config)
-
-
Method Detail
-
create
public <RequestT> io.grpc.CallOptions create(io.grpc.MethodDescriptor<RequestT,?> descriptor, RequestT request)
Creates aCallOptions
with a focus onDeadline
. Deadlines are decided in the following order:- If a user set a
Context
deadline (seeContext.getDeadline()
), use that - If a user configured deadlines via
CallOptionsConfig
, use it. - Otherwise, use
CallOptions.DEFAULT
.
- Specified by:
create
in interfaceCallOptionsFactory
- Type Parameters:
RequestT
- a RequestT object.- Parameters:
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 timeouts- Returns:
- a
CallOptions
object.
- If a user set a
-
isLongRequest
@Deprecated public static boolean isLongRequest(Object request)
Deprecated. Please usegetRequestTimeout(Object)
to fetch long requests timeout.- Parameters:
request
-- Returns:
- true if this is a
MutateRowsRequest
or aReadRowsRequest
that's a scan.
-
isGet
public static boolean isGet(com.google.bigtable.v2.ReadRowsRequest request)
-
-