@@ -112,7 +112,8 @@ public static GrpcCallContext createDefault() {
112
112
ApiCallContextOptions .getDefaultOptions (),
113
113
null ,
114
114
null ,
115
- null );
115
+ null ,
116
+ false );
116
117
}
117
118
118
119
/** Returns an instance with the given channel and {@link CallOptions}. */
@@ -129,35 +130,7 @@ public static GrpcCallContext of(Channel channel, CallOptions callOptions) {
129
130
ApiCallContextOptions .getDefaultOptions (),
130
131
null ,
131
132
null ,
132
- null );
133
- }
134
-
135
- private GrpcCallContext (
136
- Channel channel ,
137
- @ Nullable Credentials credentials ,
138
- CallOptions callOptions ,
139
- @ Nullable java .time .Duration timeout ,
140
- @ Nullable java .time .Duration streamWaitTimeout ,
141
- @ Nullable java .time .Duration streamIdleTimeout ,
142
- @ Nullable Integer channelAffinity ,
143
- ImmutableMap <String , List <String >> extraHeaders ,
144
- ApiCallContextOptions options ,
145
- @ Nullable RetrySettings retrySettings ,
146
- @ Nullable Set <StatusCode .Code > retryableCodes ,
147
- @ Nullable EndpointContext endpointContext ) {
148
- this (
149
- channel ,
150
- credentials ,
151
- callOptions ,
152
- timeout ,
153
- streamWaitTimeout ,
154
- streamIdleTimeout ,
155
- channelAffinity ,
156
- extraHeaders ,
157
- options ,
158
- retrySettings ,
159
- retryableCodes ,
160
- endpointContext ,
133
+ null ,
161
134
false );
162
135
}
163
136
@@ -231,7 +204,8 @@ public GrpcCallContext withCredentials(Credentials newCredentials) {
231
204
options ,
232
205
retrySettings ,
233
206
retryableCodes ,
234
- endpointContext );
207
+ endpointContext ,
208
+ isDirectPath );
235
209
}
236
210
237
211
@ Override
@@ -273,7 +247,8 @@ public GrpcCallContext withEndpointContext(EndpointContext endpointContext) {
273
247
options ,
274
248
retrySettings ,
275
249
retryableCodes ,
276
- endpointContext );
250
+ endpointContext ,
251
+ isDirectPath );
277
252
}
278
253
279
254
/** This method is obsolete. Use {@link #withTimeoutDuration(java.time.Duration)} instead. */
@@ -307,7 +282,8 @@ public GrpcCallContext withTimeoutDuration(@Nullable java.time.Duration timeout)
307
282
options ,
308
283
retrySettings ,
309
284
retryableCodes ,
310
- endpointContext );
285
+ endpointContext ,
286
+ isDirectPath );
311
287
}
312
288
313
289
/** This method is obsolete. Use {@link #getTimeoutDuration()} instead. */
@@ -355,7 +331,8 @@ public GrpcCallContext withStreamWaitTimeoutDuration(
355
331
options ,
356
332
retrySettings ,
357
333
retryableCodes ,
358
- endpointContext );
334
+ endpointContext ,
335
+ isDirectPath );
359
336
}
360
337
361
338
/**
@@ -389,7 +366,8 @@ public GrpcCallContext withStreamIdleTimeoutDuration(
389
366
options ,
390
367
retrySettings ,
391
368
retryableCodes ,
392
- endpointContext );
369
+ endpointContext ,
370
+ isDirectPath );
393
371
}
394
372
395
373
@ BetaApi ("The surface for channel affinity is not stable yet and may change in the future." )
@@ -406,7 +384,8 @@ public GrpcCallContext withChannelAffinity(@Nullable Integer affinity) {
406
384
options ,
407
385
retrySettings ,
408
386
retryableCodes ,
409
- endpointContext );
387
+ endpointContext ,
388
+ isDirectPath );
410
389
}
411
390
412
391
@ BetaApi ("The surface for extra headers is not stable yet and may change in the future." )
@@ -427,7 +406,8 @@ public GrpcCallContext withExtraHeaders(Map<String, List<String>> extraHeaders)
427
406
options ,
428
407
retrySettings ,
429
408
retryableCodes ,
430
- endpointContext );
409
+ endpointContext ,
410
+ isDirectPath );
431
411
}
432
412
433
413
@ Override
@@ -449,7 +429,8 @@ public GrpcCallContext withRetrySettings(RetrySettings retrySettings) {
449
429
options ,
450
430
retrySettings ,
451
431
retryableCodes ,
452
- endpointContext );
432
+ endpointContext ,
433
+ isDirectPath );
453
434
}
454
435
455
436
@ Override
@@ -471,7 +452,8 @@ public GrpcCallContext withRetryableCodes(Set<StatusCode.Code> retryableCodes) {
471
452
options ,
472
453
retrySettings ,
473
454
retryableCodes ,
474
- endpointContext );
455
+ endpointContext ,
456
+ isDirectPath );
475
457
}
476
458
477
459
@ Override
@@ -570,7 +552,8 @@ public ApiCallContext merge(ApiCallContext inputCallContext) {
570
552
newOptions ,
571
553
newRetrySettings ,
572
554
newRetryableCodes ,
573
- endpointContext );
555
+ endpointContext ,
556
+ isDirectPath );
574
557
}
575
558
576
559
/** The {@link Channel} set on this context. */
@@ -649,7 +632,8 @@ public GrpcCallContext withChannel(Channel newChannel) {
649
632
options ,
650
633
retrySettings ,
651
634
retryableCodes ,
652
- endpointContext );
635
+ endpointContext ,
636
+ isDirectPath );
653
637
}
654
638
655
639
/** Returns a new instance with the call options set to the given call options. */
@@ -666,7 +650,8 @@ public GrpcCallContext withCallOptions(CallOptions newCallOptions) {
666
650
options ,
667
651
retrySettings ,
668
652
retryableCodes ,
669
- endpointContext );
653
+ endpointContext ,
654
+ isDirectPath );
670
655
}
671
656
672
657
public GrpcCallContext withRequestParamsDynamicHeaderOption (String requestParams ) {
@@ -710,7 +695,8 @@ public <T> GrpcCallContext withOption(Key<T> key, T value) {
710
695
newOptions ,
711
696
retrySettings ,
712
697
retryableCodes ,
713
- endpointContext );
698
+ endpointContext ,
699
+ isDirectPath );
714
700
}
715
701
716
702
/** {@inheritDoc} */
0 commit comments