in src/main/java/org/apache/skywalking/banyandb/v1/client/BanyanDBClient.java [163:178]
public void connect() throws IOException {
connectionEstablishLock.lock();
try {
if (!isConnected) {
this.channel = ChannelManager.create(this.options.buildChannelManagerSettings(),
new DefaultChannelFactory(this.host, this.port, this.options));
streamServiceBlockingStub = StreamServiceGrpc.newBlockingStub(this.channel);
measureServiceBlockingStub = MeasureServiceGrpc.newBlockingStub(this.channel);
streamServiceStub = StreamServiceGrpc.newStub(this.channel);
measureServiceStub = MeasureServiceGrpc.newStub(this.channel);
isConnected = true;
}
} finally {
connectionEstablishLock.unlock();
}
}