Skip to content

Commit ce9981a

Browse files
committed
rename sslHostOverride -> authority
1 parent 927a38c commit ce9981a

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

core/src/main/java/tech/ydb/core/impl/pool/EndpointRecord.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,20 +9,20 @@ public class EndpointRecord {
99
private final String host;
1010
private final String hostAndPort;
1111
private final String locationDC;
12-
private final String sslNameOverride;
12+
private final String authority;
1313
private final int port;
1414
private final int nodeId;
1515

16-
public EndpointRecord(String host, int port, int nodeId, String locationDC, String sslNameOverride) {
16+
public EndpointRecord(String host, int port, int nodeId, String locationDC, String authority) {
1717
this.host = Objects.requireNonNull(host);
1818
this.port = port;
1919
this.hostAndPort = host + ":" + port;
2020
this.nodeId = nodeId;
2121
this.locationDC = locationDC;
22-
if (sslNameOverride != null && !sslNameOverride.isEmpty()) {
23-
this.sslNameOverride = sslNameOverride;
22+
if (authority != null && !authority.isEmpty()) {
23+
this.authority = authority;
2424
} else {
25-
this.sslNameOverride = null;
25+
this.authority = null;
2626
}
2727
}
2828

@@ -34,8 +34,8 @@ public String getHost() {
3434
return host;
3535
}
3636

37-
public String getSslNameOverride() {
38-
return sslNameOverride;
37+
public String getAuthority() {
38+
return authority;
3939
}
4040

4141
public int getPort() {
@@ -57,6 +57,6 @@ public String getLocation() {
5757
@Override
5858
public String toString() {
5959
return "Endpoint{host=" + host + ", port=" + port + ", node=" + nodeId +
60-
", location=" + locationDC + ", sslNameOverride=" + sslNameOverride + "}";
60+
", location=" + locationDC + ", overrideAuthority=" + authority + "}";
6161
}
6262
}

core/src/main/java/tech/ydb/core/impl/pool/GrpcChannel.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public GrpcChannel(EndpointRecord endpoint, ManagedChannelFactory factory) {
2929
logger.debug("Creating grpc channel with {}", endpoint);
3030
this.endpoint = endpoint;
3131
this.channel = factory.newManagedChannel(endpoint.getHost(), endpoint.getPort(),
32-
endpoint.getSslNameOverride());
32+
endpoint.getAuthority());
3333
this.connectTimeoutMs = factory.getConnectTimeoutMs();
3434
this.readyWatcher = new ReadyWatcher();
3535
this.readyWatcher.checkState();

core/src/main/java/tech/ydb/core/impl/pool/ManagedChannelFactory.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ interface Builder {
1313
ManagedChannelFactory buildFactory(GrpcTransportBuilder builder);
1414
}
1515

16-
ManagedChannel newManagedChannel(String host, int port, String sslHostOverride);
16+
ManagedChannel newManagedChannel(String host, int port, String authority);
1717

1818
long getConnectTimeoutMs();
1919
}

core/src/test/java/tech/ydb/core/impl/pool/GrpcChannelTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public void badChannels() {
8484
Assert.assertEquals(endpoint, channel.getEndpoint());
8585

8686
RuntimeException ex1 = Assert.assertThrows(RuntimeException.class, channel::getReadyChannel);
87-
Assert.assertEquals("Channel Endpoint{host=host1, port=1234, node=0, location=null, sslNameOverride=null} connecting problem",
87+
Assert.assertEquals("Channel Endpoint{host=host1, port=1234, node=0, location=null, overrideAuthority=null} connecting problem",
8888
ex1.getMessage());
8989

9090
channel.shutdown();

core/src/test/java/tech/ydb/core/impl/pool/ManagedChannelMock.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ public boolean awaitTermination(long timeout, TimeUnit unit) throws InterruptedE
145145

146146
public static ManagedChannelFactory.Builder MOCKED = (GrpcTransportBuilder builder) -> new ManagedChannelFactory() {
147147
@Override
148-
public ManagedChannel newManagedChannel(String host, int port, String sslHostOverride) {
148+
public ManagedChannel newManagedChannel(String host, int port, String authority) {
149149
return good();
150150
}
151151

0 commit comments

Comments
 (0)