@@ -213,6 +213,7 @@ public class EnhancedBigtableStubSettings extends StubSettings<EnhancedBigtableS
213213 private ImmutableList <String > primedTableIds ;
214214 private final Map <String , String > jwtAudienceMapping ;
215215 private final boolean enableRoutingCookie ;
216+ private final boolean enableRetryInfo ;
216217
217218 private final ServerStreamingCallSettings <Query , Row > readRowsSettings ;
218219 private final UnaryCallSettings <Query , Row > readRowSettings ;
@@ -255,6 +256,7 @@ private EnhancedBigtableStubSettings(Builder builder) {
255256 primedTableIds = builder .primedTableIds ;
256257 jwtAudienceMapping = builder .jwtAudienceMapping ;
257258 enableRoutingCookie = builder .enableRoutingCookie ;
259+ enableRetryInfo = builder .enableRetryInfo ;
258260
259261 // Per method settings.
260262 readRowsSettings = builder .readRowsSettings .build ();
@@ -325,6 +327,15 @@ public boolean getEnableRoutingCookie() {
325327 return enableRoutingCookie ;
326328 }
327329
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+
328339 /** Returns a builder for the default ChannelProvider for this service. */
329340 public static InstantiatingGrpcChannelProvider .Builder defaultGrpcTransportProviderBuilder () {
330341 return BigtableStubSettings .defaultGrpcTransportProviderBuilder ()
@@ -608,6 +619,7 @@ public static class Builder extends StubSettings.Builder<EnhancedBigtableStubSet
608619 private ImmutableList <String > primedTableIds ;
609620 private Map <String , String > jwtAudienceMapping ;
610621 private boolean enableRoutingCookie ;
622+ private boolean enableRetryInfo ;
611623
612624 private final ServerStreamingCallSettings .Builder <Query , Row > readRowsSettings ;
613625 private final UnaryCallSettings .Builder <Query , Row > readRowSettings ;
@@ -641,6 +653,7 @@ private Builder() {
641653 jwtAudienceMapping = DEFAULT_JWT_AUDIENCE_MAPPING ;
642654 setCredentialsProvider (defaultCredentialsProviderBuilder ().build ());
643655 this .enableRoutingCookie = true ;
656+ this .enableRetryInfo = true ;
644657
645658 // Defaults provider
646659 BigtableStubSettings .Builder baseDefaults = BigtableStubSettings .newBuilder ();
@@ -760,6 +773,7 @@ private Builder(EnhancedBigtableStubSettings settings) {
760773 primedTableIds = settings .primedTableIds ;
761774 jwtAudienceMapping = settings .jwtAudienceMapping ;
762775 enableRoutingCookie = settings .enableRoutingCookie ;
776+ enableRetryInfo = settings .enableRetryInfo ;
763777
764778 // Per method settings.
765779 readRowsSettings = settings .readRowsSettings .toBuilder ();
@@ -927,6 +941,25 @@ public boolean getEnableRoutingCookie() {
927941 return enableRoutingCookie ;
928942 }
929943
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+
930963 /** Returns the builder for the settings used for calls to readRows. */
931964 public ServerStreamingCallSettings .Builder <Query , Row > readRowsSettings () {
932965 return readRowsSettings ;
@@ -1054,6 +1087,7 @@ public String toString() {
10541087 .add ("primedTableIds" , primedTableIds )
10551088 .add ("jwtAudienceMapping" , jwtAudienceMapping )
10561089 .add ("enableRoutingCookie" , enableRoutingCookie )
1090+ .add ("enableRetryInfo" , enableRetryInfo )
10571091 .add ("readRowsSettings" , readRowsSettings )
10581092 .add ("readRowSettings" , readRowSettings )
10591093 .add ("sampleRowKeysSettings" , sampleRowKeysSettings )
0 commit comments