@@ -163,6 +163,7 @@ static class SpannerPoolKey {
163
163
private final boolean enableEndToEndTracing ;
164
164
private final String clientCertificate ;
165
165
private final String clientCertificateKey ;
166
+ private final boolean isExperimentalHost ;
166
167
167
168
@ VisibleForTesting
168
169
static SpannerPoolKey of (ConnectionOptions options ) {
@@ -196,6 +197,7 @@ private SpannerPoolKey(ConnectionOptions options) throws IOException {
196
197
this .enableEndToEndTracing = options .isEndToEndTracingEnabled ();
197
198
this .clientCertificate = options .getClientCertificate ();
198
199
this .clientCertificateKey = options .getClientCertificateKey ();
200
+ this .isExperimentalHost = options .isExperimentalHost ();
199
201
}
200
202
201
203
@ Override
@@ -220,7 +222,8 @@ public boolean equals(Object o) {
220
222
&& Objects .equals (this .enableApiTracing , other .enableApiTracing )
221
223
&& Objects .equals (this .enableEndToEndTracing , other .enableEndToEndTracing )
222
224
&& Objects .equals (this .clientCertificate , other .clientCertificate )
223
- && Objects .equals (this .clientCertificateKey , other .clientCertificateKey );
225
+ && Objects .equals (this .clientCertificateKey , other .clientCertificateKey )
226
+ && Objects .equals (this .isExperimentalHost , other .isExperimentalHost );
224
227
}
225
228
226
229
@ Override
@@ -241,7 +244,8 @@ public int hashCode() {
241
244
this .enableApiTracing ,
242
245
this .enableEndToEndTracing ,
243
246
this .clientCertificate ,
244
- this .clientCertificateKey );
247
+ this .clientCertificateKey ,
248
+ this .isExperimentalHost );
245
249
}
246
250
}
247
251
@@ -405,6 +409,9 @@ Spanner createSpanner(SpannerPoolKey key, ConnectionOptions options) {
405
409
if (key .clientCertificate != null && key .clientCertificateKey != null ) {
406
410
builder .useClientCert (key .clientCertificate , key .clientCertificateKey );
407
411
}
412
+ if (key .isExperimentalHost ) {
413
+ builder .setExperimentalHost (key .host );
414
+ }
408
415
if (options .getConfigurator () != null ) {
409
416
options .getConfigurator ().configure (builder );
410
417
}
0 commit comments