@@ -141,22 +141,22 @@ public class Client implements AutoCloseable {
141141
142142 // Server context
143143 private String serverVersion ;
144- private Object metrics ;
144+ private Object metricsRegistry ;
145145
146146 private Client (Set <String > endpoints , Map <String ,String > configuration , boolean useNewImplementation ,
147147 ExecutorService sharedOperationExecutor , ColumnToMethodMatchingStrategy columnToMethodMatchingStrategy ) {
148148 this (endpoints , configuration , useNewImplementation , sharedOperationExecutor , columnToMethodMatchingStrategy , null );
149149 }
150150
151151 private Client (Set <String > endpoints , Map <String ,String > configuration , boolean useNewImplementation ,
152- ExecutorService sharedOperationExecutor , ColumnToMethodMatchingStrategy columnToMethodMatchingStrategy , Object metrics ) {
152+ ExecutorService sharedOperationExecutor , ColumnToMethodMatchingStrategy columnToMethodMatchingStrategy , Object metricsRegistry ) {
153153 this .endpoints = endpoints ;
154154 this .configuration = configuration ;
155155 this .readOnlyConfig = Collections .unmodifiableMap (this .configuration );
156156 this .endpoints .forEach (endpoint -> {
157157 this .serverNodes .add (ClickHouseNode .of (endpoint , this .configuration ));
158158 });
159- this .metrics = metrics ;
159+ this .metricsRegistry = metricsRegistry ;
160160 this .serializers = new ConcurrentHashMap <>();
161161 this .deserializers = new ConcurrentHashMap <>();
162162
@@ -169,7 +169,7 @@ private Client(Set<String> endpoints, Map<String,String> configuration, boolean
169169 this .sharedOperationExecutor = sharedOperationExecutor ;
170170 }
171171 boolean initSslContext = getEndpoints ().stream ().anyMatch (s -> s .toLowerCase ().contains ("https://" ));
172- this .httpClientHelper = new HttpAPIClientHelper (configuration , metrics , initSslContext );
172+ this .httpClientHelper = new HttpAPIClientHelper (configuration , metricsRegistry , initSslContext );
173173 this .columnToMethodMatchingStrategy = columnToMethodMatchingStrategy ;
174174 }
175175
@@ -236,7 +236,7 @@ public static class Builder {
236236
237237 private ExecutorService sharedOperationExecutor = null ;
238238 private ColumnToMethodMatchingStrategy columnToMethodMatchingStrategy ;
239- private Object metric = null ;
239+ private Object metricRegistry = null ;
240240 public Builder () {
241241 this .endpoints = new HashSet <>();
242242 this .configuration = new HashMap <String , String >();
@@ -961,7 +961,7 @@ public Builder useBearerTokenAuth(String bearerToken) {
961961 * @return same instance of the builder
962962 */
963963 public Builder registerClientMetrics (Object registry , String name ) {
964- this .metric = registry ;
964+ this .metricRegistry = registry ;
965965 this .configuration .put (ClientConfigProperties .METRICS_GROUP_NAME .getKey (), name );
966966 return this ;
967967 }
@@ -1025,7 +1025,7 @@ public Client build() {
10251025 }
10261026
10271027 return new Client (this .endpoints , this .configuration , this .useNewImplementation , this .sharedOperationExecutor ,
1028- this .columnToMethodMatchingStrategy , this .metric );
1028+ this .columnToMethodMatchingStrategy , this .metricRegistry );
10291029 }
10301030
10311031
0 commit comments