Class BigtableBatchingCallSettings.Builder
- java.lang.Object
-
- com.google.api.gax.rpc.UnaryCallSettings.Builder<BulkMutation,Void>
-
- com.google.cloud.bigtable.data.v2.stub.BigtableBatchingCallSettings.Builder
-
- Enclosing class:
- BigtableBatchingCallSettings
public static class BigtableBatchingCallSettings.Builder extends com.google.api.gax.rpc.UnaryCallSettings.Builder<BulkMutation,Void>
A base builder class forBigtableBatchingCallSettings
. See the class documentation ofBigtableBatchingCallSettings
for a description of the different values that can be set.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description BigtableBatchingCallSettings
build()
Builds theBigtableBatchingCallSettings
object with provided configuration.BigtableBatchingCallSettings.Builder
disableLatencyBasedThrottling()
Disable latency based throttling.BigtableBatchingCallSettings.Builder
enableLatencyBasedThrottling(long targetRpcLatency)
Enable latency based throttling.com.google.api.gax.batching.BatchingSettings
getBatchingSettings()
Returns theBatchingSettings
.Long
getTargetRpcLatencyMs()
Gets target rpc latency if latency based throttling is enabled.boolean
isLatencyBasedThrottlingEnabled()
Gets if latency based throttling is enabled.boolean
isServerInitiatedFlowControlEnabled()
Gets if flow control is enabled based on the load of the Bigtable server.BigtableBatchingCallSettings.Builder
setBatchingSettings(com.google.api.gax.batching.BatchingSettings batchingSettings)
Sets the batching settings with various thresholds.BigtableBatchingCallSettings.Builder
setRetryableCodes(com.google.api.gax.rpc.StatusCode.Code... codes)
Sets the rpc failurecode
, for which retries should be performed.BigtableBatchingCallSettings.Builder
setRetryableCodes(Set<com.google.api.gax.rpc.StatusCode.Code> retryableCodes)
Sets the rpc failurecode
, for which retries should be performed.BigtableBatchingCallSettings.Builder
setRetrySettings(com.google.api.gax.retrying.RetrySettings retrySettings)
Sets theRetrySettings
values for each retry attempts.BigtableBatchingCallSettings.Builder
setServerInitiatedFlowControl(boolean isEnable)
Configure flow control based on the current load of the Bigtable server.
-
-
-
Method Detail
-
setBatchingSettings
public BigtableBatchingCallSettings.Builder setBatchingSettings(@Nonnull com.google.api.gax.batching.BatchingSettings batchingSettings)
Sets the batching settings with various thresholds.
-
getBatchingSettings
public com.google.api.gax.batching.BatchingSettings getBatchingSettings()
Returns theBatchingSettings
.
-
setRetryableCodes
public BigtableBatchingCallSettings.Builder setRetryableCodes(com.google.api.gax.rpc.StatusCode.Code... codes)
Sets the rpc failurecode
, for which retries should be performed.- Overrides:
setRetryableCodes
in classcom.google.api.gax.rpc.UnaryCallSettings.Builder<BulkMutation,Void>
-
setRetryableCodes
public BigtableBatchingCallSettings.Builder setRetryableCodes(Set<com.google.api.gax.rpc.StatusCode.Code> retryableCodes)
Sets the rpc failurecode
, for which retries should be performed.- Overrides:
setRetryableCodes
in classcom.google.api.gax.rpc.UnaryCallSettings.Builder<BulkMutation,Void>
-
setRetrySettings
public BigtableBatchingCallSettings.Builder setRetrySettings(@Nonnull com.google.api.gax.retrying.RetrySettings retrySettings)
Sets theRetrySettings
values for each retry attempts.- Overrides:
setRetrySettings
in classcom.google.api.gax.rpc.UnaryCallSettings.Builder<BulkMutation,Void>
-
enableLatencyBasedThrottling
public BigtableBatchingCallSettings.Builder enableLatencyBasedThrottling(long targetRpcLatency)
Enable latency based throttling. The number of allowed in-flight requests will be adjusted to reach the target rpc latency.
-
disableLatencyBasedThrottling
public BigtableBatchingCallSettings.Builder disableLatencyBasedThrottling()
Disable latency based throttling.
-
getTargetRpcLatencyMs
@Nullable public Long getTargetRpcLatencyMs()
Gets target rpc latency if latency based throttling is enabled. Otherwise returns null.
-
isLatencyBasedThrottlingEnabled
public boolean isLatencyBasedThrottlingEnabled()
Gets if latency based throttling is enabled.
-
setServerInitiatedFlowControl
@InternalApi("Intended for use by the Bigtable dataflow connectors only") public BigtableBatchingCallSettings.Builder setServerInitiatedFlowControl(boolean isEnable)
Configure flow control based on the current load of the Bigtable server.
-
isServerInitiatedFlowControlEnabled
@InternalApi("Intended for use by the Bigtable dataflow connectors only") public boolean isServerInitiatedFlowControlEnabled()
Gets if flow control is enabled based on the load of the Bigtable server.
-
build
public BigtableBatchingCallSettings build()
Builds theBigtableBatchingCallSettings
object with provided configuration.- Overrides:
build
in classcom.google.api.gax.rpc.UnaryCallSettings.Builder<BulkMutation,Void>
-
-