@@ -213,6 +213,7 @@ public class EnhancedBigtableStubSettings extends StubSettings<EnhancedBigtableS
213
213
private ImmutableList <String > primedTableIds ;
214
214
private final Map <String , String > jwtAudienceMapping ;
215
215
private final boolean enableRoutingCookie ;
216
+ private final boolean enableRetryInfo ;
216
217
217
218
private final ServerStreamingCallSettings <Query , Row > readRowsSettings ;
218
219
private final UnaryCallSettings <Query , Row > readRowSettings ;
@@ -255,6 +256,7 @@ private EnhancedBigtableStubSettings(Builder builder) {
255
256
primedTableIds = builder .primedTableIds ;
256
257
jwtAudienceMapping = builder .jwtAudienceMapping ;
257
258
enableRoutingCookie = builder .enableRoutingCookie ;
259
+ enableRetryInfo = builder .enableRetryInfo ;
258
260
259
261
// Per method settings.
260
262
readRowsSettings = builder .readRowsSettings .build ();
@@ -325,6 +327,15 @@ public boolean getEnableRoutingCookie() {
325
327
return enableRoutingCookie ;
326
328
}
327
329
330
+ /**
331
+ * Gets if RetryInfo is enabled. If true, client bases retry decision and back off time on server
332
+ * returned RetryInfo value. Otherwise, client uses {@link RetrySettings}.
333
+ */
334
+ @ BetaApi ("RetryInfo is not currently stable and may change in the future" )
335
+ public boolean getEnableRetryInfo () {
336
+ return enableRetryInfo ;
337
+ }
338
+
328
339
/** Returns a builder for the default ChannelProvider for this service. */
329
340
public static InstantiatingGrpcChannelProvider .Builder defaultGrpcTransportProviderBuilder () {
330
341
return BigtableStubSettings .defaultGrpcTransportProviderBuilder ()
@@ -608,6 +619,7 @@ public static class Builder extends StubSettings.Builder<EnhancedBigtableStubSet
608
619
private ImmutableList <String > primedTableIds ;
609
620
private Map <String , String > jwtAudienceMapping ;
610
621
private boolean enableRoutingCookie ;
622
+ private boolean enableRetryInfo ;
611
623
612
624
private final ServerStreamingCallSettings .Builder <Query , Row > readRowsSettings ;
613
625
private final UnaryCallSettings .Builder <Query , Row > readRowSettings ;
@@ -641,6 +653,7 @@ private Builder() {
641
653
jwtAudienceMapping = DEFAULT_JWT_AUDIENCE_MAPPING ;
642
654
setCredentialsProvider (defaultCredentialsProviderBuilder ().build ());
643
655
this .enableRoutingCookie = true ;
656
+ this .enableRetryInfo = true ;
644
657
645
658
// Defaults provider
646
659
BigtableStubSettings .Builder baseDefaults = BigtableStubSettings .newBuilder ();
@@ -760,6 +773,7 @@ private Builder(EnhancedBigtableStubSettings settings) {
760
773
primedTableIds = settings .primedTableIds ;
761
774
jwtAudienceMapping = settings .jwtAudienceMapping ;
762
775
enableRoutingCookie = settings .enableRoutingCookie ;
776
+ enableRetryInfo = settings .enableRetryInfo ;
763
777
764
778
// Per method settings.
765
779
readRowsSettings = settings .readRowsSettings .toBuilder ();
@@ -927,6 +941,25 @@ public boolean getEnableRoutingCookie() {
927
941
return enableRoutingCookie ;
928
942
}
929
943
944
+ /**
945
+ * Sets if RetryInfo is enabled. If true, client bases retry decision and back off time on
946
+ * server returned RetryInfo value. Otherwise, client uses {@link RetrySettings}.
947
+ */
948
+ @ BetaApi ("RetryInfo is not currently stable and may change in the future" )
949
+ public Builder setEnableRetryInfo (boolean enableRetryInfo ) {
950
+ this .enableRetryInfo = enableRetryInfo ;
951
+ return this ;
952
+ }
953
+
954
+ /**
955
+ * Gets if RetryInfo is enabled. If true, client bases retry decision and back off time on
956
+ * server returned RetryInfo value. Otherwise, client uses {@link RetrySettings}.
957
+ */
958
+ @ BetaApi ("RetryInfo is not currently stable and may change in the future" )
959
+ public boolean getEnableRetryInfo () {
960
+ return enableRetryInfo ;
961
+ }
962
+
930
963
/** Returns the builder for the settings used for calls to readRows. */
931
964
public ServerStreamingCallSettings .Builder <Query , Row > readRowsSettings () {
932
965
return readRowsSettings ;
@@ -1054,6 +1087,7 @@ public String toString() {
1054
1087
.add ("primedTableIds" , primedTableIds )
1055
1088
.add ("jwtAudienceMapping" , jwtAudienceMapping )
1056
1089
.add ("enableRoutingCookie" , enableRoutingCookie )
1090
+ .add ("enableRetryInfo" , enableRetryInfo )
1057
1091
.add ("readRowsSettings" , readRowsSettings )
1058
1092
.add ("readRowSettings" , readRowSettings )
1059
1093
.add ("sampleRowKeysSettings" , sampleRowKeysSettings )
0 commit comments