3939import com .google .bigtable .v2 .MutateRowResponse ;
4040import com .google .bigtable .v2 .MutateRowsRequest ;
4141import com .google .bigtable .v2 .MutateRowsResponse ;
42+ import com .google .bigtable .v2 .PingAndWarmRequest ;
43+ import com .google .bigtable .v2 .PingAndWarmResponse ;
4244import com .google .bigtable .v2 .ReadModifyWriteRowRequest ;
4345import com .google .bigtable .v2 .ReadModifyWriteRowResponse ;
4446import com .google .bigtable .v2 .ReadRowsRequest ;
@@ -78,6 +80,7 @@ public class BigtableStubSettings extends StubSettings<BigtableStubSettings> {
7880 mutateRowsSettings ;
7981 private final UnaryCallSettings <CheckAndMutateRowRequest , CheckAndMutateRowResponse >
8082 checkAndMutateRowSettings ;
83+ private final UnaryCallSettings <PingAndWarmRequest , PingAndWarmResponse > pingAndWarmSettings ;
8184 private final UnaryCallSettings <ReadModifyWriteRowRequest , ReadModifyWriteRowResponse >
8285 readModifyWriteRowSettings ;
8386
@@ -108,6 +111,11 @@ public ServerStreamingCallSettings<MutateRowsRequest, MutateRowsResponse> mutate
108111 return checkAndMutateRowSettings ;
109112 }
110113
114+ /** Returns the object with the settings used for calls to pingAndWarm. */
115+ public UnaryCallSettings <PingAndWarmRequest , PingAndWarmResponse > pingAndWarmSettings () {
116+ return pingAndWarmSettings ;
117+ }
118+
111119 /** Returns the object with the settings used for calls to readModifyWriteRow. */
112120 public UnaryCallSettings <ReadModifyWriteRowRequest , ReadModifyWriteRowResponse >
113121 readModifyWriteRowSettings () {
@@ -194,6 +202,7 @@ protected BigtableStubSettings(Builder settingsBuilder) throws IOException {
194202 mutateRowSettings = settingsBuilder .mutateRowSettings ().build ();
195203 mutateRowsSettings = settingsBuilder .mutateRowsSettings ().build ();
196204 checkAndMutateRowSettings = settingsBuilder .checkAndMutateRowSettings ().build ();
205+ pingAndWarmSettings = settingsBuilder .pingAndWarmSettings ().build ();
197206 readModifyWriteRowSettings = settingsBuilder .readModifyWriteRowSettings ().build ();
198207 }
199208
@@ -209,6 +218,8 @@ public static class Builder extends StubSettings.Builder<BigtableStubSettings, B
209218 mutateRowsSettings ;
210219 private final UnaryCallSettings .Builder <CheckAndMutateRowRequest , CheckAndMutateRowResponse >
211220 checkAndMutateRowSettings ;
221+ private final UnaryCallSettings .Builder <PingAndWarmRequest , PingAndWarmResponse >
222+ pingAndWarmSettings ;
212223 private final UnaryCallSettings .Builder <ReadModifyWriteRowRequest , ReadModifyWriteRowResponse >
213224 readModifyWriteRowSettings ;
214225 private static final ImmutableMap <String , ImmutableSet <StatusCode .Code >>
@@ -218,18 +229,19 @@ public static class Builder extends StubSettings.Builder<BigtableStubSettings, B
218229 ImmutableMap .Builder <String , ImmutableSet <StatusCode .Code >> definitions =
219230 ImmutableMap .builder ();
220231 definitions .put (
221- "retry_policy_3_codes " , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
232+ "no_retry_3_codes " , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
222233 definitions .put (
223- "retry_policy_1_codes " , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
234+ "no_retry_1_codes " , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
224235 definitions .put (
225236 "retry_policy_4_codes" ,
226237 ImmutableSet .copyOf (
227238 Lists .<StatusCode .Code >newArrayList (
228239 StatusCode .Code .UNAVAILABLE , StatusCode .Code .DEADLINE_EXCEEDED )));
229240 definitions .put (
230- "retry_policy_2_codes " , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
241+ "no_retry_2_codes " , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
231242 definitions .put (
232- "retry_policy_0_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
243+ "no_retry_0_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
244+ definitions .put ("no_retry_codes" , ImmutableSet .copyOf (Lists .<StatusCode .Code >newArrayList ()));
233245 RETRYABLE_CODE_DEFINITIONS = definitions .build ();
234246 }
235247
@@ -240,26 +252,20 @@ public static class Builder extends StubSettings.Builder<BigtableStubSettings, B
240252 RetrySettings settings = null ;
241253 settings =
242254 RetrySettings .newBuilder ()
243- .setInitialRetryDelay (Duration .ofMillis (10L ))
244- .setRetryDelayMultiplier (2.0 )
245- .setMaxRetryDelay (Duration .ofMillis (60000L ))
246255 .setInitialRpcTimeout (Duration .ofMillis (43200000L ))
247256 .setRpcTimeoutMultiplier (1.0 )
248257 .setMaxRpcTimeout (Duration .ofMillis (43200000L ))
249258 .setTotalTimeout (Duration .ofMillis (43200000L ))
250259 .build ();
251- definitions .put ("retry_policy_3_params " , settings );
260+ definitions .put ("no_retry_3_params " , settings );
252261 settings =
253262 RetrySettings .newBuilder ()
254- .setInitialRetryDelay (Duration .ofMillis (10L ))
255- .setRetryDelayMultiplier (2.0 )
256- .setMaxRetryDelay (Duration .ofMillis (60000L ))
257263 .setInitialRpcTimeout (Duration .ofMillis (60000L ))
258264 .setRpcTimeoutMultiplier (1.0 )
259265 .setMaxRpcTimeout (Duration .ofMillis (60000L ))
260266 .setTotalTimeout (Duration .ofMillis (60000L ))
261267 .build ();
262- definitions .put ("retry_policy_1_params " , settings );
268+ definitions .put ("no_retry_1_params " , settings );
263269 settings =
264270 RetrySettings .newBuilder ()
265271 .setInitialRetryDelay (Duration .ofMillis (10L ))
@@ -273,26 +279,22 @@ public static class Builder extends StubSettings.Builder<BigtableStubSettings, B
273279 definitions .put ("retry_policy_4_params" , settings );
274280 settings =
275281 RetrySettings .newBuilder ()
276- .setInitialRetryDelay (Duration .ofMillis (10L ))
277- .setRetryDelayMultiplier (2.0 )
278- .setMaxRetryDelay (Duration .ofMillis (60000L ))
279282 .setInitialRpcTimeout (Duration .ofMillis (600000L ))
280283 .setRpcTimeoutMultiplier (1.0 )
281284 .setMaxRpcTimeout (Duration .ofMillis (600000L ))
282285 .setTotalTimeout (Duration .ofMillis (600000L ))
283286 .build ();
284- definitions .put ("retry_policy_2_params " , settings );
287+ definitions .put ("no_retry_2_params " , settings );
285288 settings =
286289 RetrySettings .newBuilder ()
287- .setInitialRetryDelay (Duration .ofMillis (10L ))
288- .setRetryDelayMultiplier (2.0 )
289- .setMaxRetryDelay (Duration .ofMillis (60000L ))
290290 .setInitialRpcTimeout (Duration .ofMillis (20000L ))
291291 .setRpcTimeoutMultiplier (1.0 )
292292 .setMaxRpcTimeout (Duration .ofMillis (20000L ))
293293 .setTotalTimeout (Duration .ofMillis (20000L ))
294294 .build ();
295- definitions .put ("retry_policy_0_params" , settings );
295+ definitions .put ("no_retry_0_params" , settings );
296+ settings = RetrySettings .newBuilder ().setRpcTimeoutMultiplier (1.0 ).build ();
297+ definitions .put ("no_retry_params" , settings );
296298 RETRY_PARAM_DEFINITIONS = definitions .build ();
297299 }
298300
@@ -308,11 +310,15 @@ protected Builder(ClientContext clientContext) {
308310 mutateRowSettings = UnaryCallSettings .newUnaryCallSettingsBuilder ();
309311 mutateRowsSettings = ServerStreamingCallSettings .newBuilder ();
310312 checkAndMutateRowSettings = UnaryCallSettings .newUnaryCallSettingsBuilder ();
313+ pingAndWarmSettings = UnaryCallSettings .newUnaryCallSettingsBuilder ();
311314 readModifyWriteRowSettings = UnaryCallSettings .newUnaryCallSettingsBuilder ();
312315
313316 unaryMethodSettingsBuilders =
314317 ImmutableList .<UnaryCallSettings .Builder <?, ?>>of (
315- mutateRowSettings , checkAndMutateRowSettings , readModifyWriteRowSettings );
318+ mutateRowSettings ,
319+ checkAndMutateRowSettings ,
320+ pingAndWarmSettings ,
321+ readModifyWriteRowSettings );
316322 initDefaults (this );
317323 }
318324
@@ -324,11 +330,15 @@ protected Builder(BigtableStubSettings settings) {
324330 mutateRowSettings = settings .mutateRowSettings .toBuilder ();
325331 mutateRowsSettings = settings .mutateRowsSettings .toBuilder ();
326332 checkAndMutateRowSettings = settings .checkAndMutateRowSettings .toBuilder ();
333+ pingAndWarmSettings = settings .pingAndWarmSettings .toBuilder ();
327334 readModifyWriteRowSettings = settings .readModifyWriteRowSettings .toBuilder ();
328335
329336 unaryMethodSettingsBuilders =
330337 ImmutableList .<UnaryCallSettings .Builder <?, ?>>of (
331- mutateRowSettings , checkAndMutateRowSettings , readModifyWriteRowSettings );
338+ mutateRowSettings ,
339+ checkAndMutateRowSettings ,
340+ pingAndWarmSettings ,
341+ readModifyWriteRowSettings );
332342 }
333343
334344 private static Builder createDefault () {
@@ -347,13 +357,13 @@ private static Builder createDefault() {
347357 private static Builder initDefaults (Builder builder ) {
348358 builder
349359 .readRowsSettings ()
350- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_3_codes " ))
351- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_3_params " ));
360+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_3_codes " ))
361+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_3_params " ));
352362
353363 builder
354364 .sampleRowKeysSettings ()
355- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_1_codes " ))
356- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_1_params " ));
365+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_1_codes " ))
366+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_1_params " ));
357367
358368 builder
359369 .mutateRowSettings ()
@@ -362,18 +372,23 @@ private static Builder initDefaults(Builder builder) {
362372
363373 builder
364374 .mutateRowsSettings ()
365- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_2_codes " ))
366- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_2_params " ));
375+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_2_codes " ))
376+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_2_params " ));
367377
368378 builder
369379 .checkAndMutateRowSettings ()
370- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_0_codes" ))
371- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_0_params" ));
380+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_0_codes" ))
381+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_0_params" ));
382+
383+ builder
384+ .pingAndWarmSettings ()
385+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_codes" ))
386+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_params" ));
372387
373388 builder
374389 .readModifyWriteRowSettings ()
375- .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("retry_policy_0_codes " ))
376- .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("retry_policy_0_params " ));
390+ .setRetryableCodes (RETRYABLE_CODE_DEFINITIONS .get ("no_retry_0_codes " ))
391+ .setRetrySettings (RETRY_PARAM_DEFINITIONS .get ("no_retry_0_params " ));
377392
378393 return builder ;
379394 }
@@ -422,6 +437,12 @@ public UnaryCallSettings.Builder<MutateRowRequest, MutateRowResponse> mutateRowS
422437 return checkAndMutateRowSettings ;
423438 }
424439
440+ /** Returns the builder for the settings used for calls to pingAndWarm. */
441+ public UnaryCallSettings .Builder <PingAndWarmRequest , PingAndWarmResponse >
442+ pingAndWarmSettings () {
443+ return pingAndWarmSettings ;
444+ }
445+
425446 /** Returns the builder for the settings used for calls to readModifyWriteRow. */
426447 public UnaryCallSettings .Builder <ReadModifyWriteRowRequest , ReadModifyWriteRowResponse >
427448 readModifyWriteRowSettings () {
0 commit comments