Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ static class SpannerPoolKey {
private final boolean enableEndToEndTracing;
private final String clientCertificate;
private final String clientCertificateKey;
private final boolean isExperimentalHost;

@VisibleForTesting
static SpannerPoolKey of(ConnectionOptions options) {
Expand Down Expand Up @@ -196,6 +197,7 @@ private SpannerPoolKey(ConnectionOptions options) throws IOException {
this.enableEndToEndTracing = options.isEndToEndTracingEnabled();
this.clientCertificate = options.getClientCertificate();
this.clientCertificateKey = options.getClientCertificateKey();
this.isExperimentalHost = options.isExperimentalHost();
}

@Override
Expand All @@ -220,7 +222,8 @@ public boolean equals(Object o) {
&& Objects.equals(this.enableApiTracing, other.enableApiTracing)
&& Objects.equals(this.enableEndToEndTracing, other.enableEndToEndTracing)
&& Objects.equals(this.clientCertificate, other.clientCertificate)
&& Objects.equals(this.clientCertificateKey, other.clientCertificateKey);
&& Objects.equals(this.clientCertificateKey, other.clientCertificateKey)
&& Objects.equals(this.isExperimentalHost, other.isExperimentalHost);
}

@Override
Expand All @@ -241,7 +244,8 @@ public int hashCode() {
this.enableApiTracing,
this.enableEndToEndTracing,
this.clientCertificate,
this.clientCertificateKey);
this.clientCertificateKey,
this.isExperimentalHost);
}
}

Expand Down Expand Up @@ -405,6 +409,9 @@ Spanner createSpanner(SpannerPoolKey key, ConnectionOptions options) {
if (key.clientCertificate != null && key.clientCertificateKey != null) {
builder.useClientCert(key.clientCertificate, key.clientCertificateKey);
}
if (key.isExperimentalHost) {
builder.setExperimentalHost(key.host);
}
if (options.getConfigurator() != null) {
options.getConfigurator().configure(builder);
}
Expand Down
Loading