@@ -36,6 +36,17 @@ public class ClientConfiguration {
36
36
37
37
private TimeseriesConfiguration timeseriesConfiguration ;
38
38
39
+ /**
40
+ * 是否开启链路追踪 默认不开启
41
+ */
42
+ private boolean enableRequestTracer = false ;
43
+
44
+
45
+ /**
46
+ * 链路追踪系统接口
47
+ */
48
+ private RequestTracer requestTracer ;
49
+
39
50
/**
40
51
* 构造新实例。
41
52
*/
@@ -45,15 +56,16 @@ public ClientConfiguration() {
45
56
46
57
/**
47
58
* 设置是否需要对请求数据进行压缩
48
- * @param enableRequestCompression
49
- * 是否需要压缩(true/false)
59
+ *
60
+ * @param enableRequestCompression 是否需要压缩(true/false)
50
61
*/
51
62
public void setEnableRequestCompression (boolean enableRequestCompression ) {
52
63
this .enableRequestCompression = enableRequestCompression ;
53
- }
64
+ }
54
65
55
66
/**
56
67
* 返回是否需要对请求数据进行压缩
68
+ *
57
69
* @return 是否需要对request进行压缩
58
70
*/
59
71
public boolean isEnableRequestCompression () {
@@ -62,36 +74,36 @@ public boolean isEnableRequestCompression() {
62
74
63
75
/**
64
76
* 是否需要告知TableStore对返回的响应内容进行压缩
65
- * @param enableResponseCompression
66
- * 是否告知TableStore对返回的响应内容进行压缩
77
+ *
78
+ * @param enableResponseCompression 是否告知TableStore对返回的响应内容进行压缩
67
79
*/
68
80
public void setEnableResponseCompression (boolean enableResponseCompression ) {
69
81
this .enableResponseCompression = enableResponseCompression ;
70
82
}
71
-
83
+
72
84
/**
73
85
* 返回是否需要告知TableStore对返回的响应内容进行压缩
74
- * @return
75
- * 是否需要告知TableStore对返回的响应内容进行压缩
76
- */
86
+ *
87
+ * @return 是否需要告知TableStore对返回的响应内容进行压缩
88
+ */
77
89
public boolean isEnableResponseCompression () {
78
90
return enableResponseCompression ;
79
91
}
80
-
92
+
81
93
/**
82
94
* 返回是否需要对响应进行验证
83
- * @return
84
- * 是否需要对响应进行验证
95
+ *
96
+ * @return 是否需要对响应进行验证
85
97
*/
86
98
public boolean isEnableResponseValidation () {
87
99
return enableResponseValidation ;
88
100
}
89
-
101
+
90
102
/**
91
- * 是否需要对响应进行验证, 如果需要验证,
103
+ * 是否需要对响应进行验证, 如果需要验证,
92
104
* Client会验证头信息完整性、结果是否过期、授权信息是否正确
93
- * @param enableResponseValidation
94
- * 是否需要对响应进行验证
105
+ *
106
+ * @param enableResponseValidation 是否需要对响应进行验证
95
107
*/
96
108
public void setEnableResponseValidation (boolean enableResponseValidation ) {
97
109
this .enableResponseValidation = enableResponseValidation ;
@@ -279,7 +291,7 @@ public void setTimeThresholdOfServerTracer(int timeThresholdOfServerTracer) {
279
291
280
292
/**
281
293
* 返回代理服务器主机地址。
282
- *
294
+ *
283
295
* @return 代理服务器主机地址。
284
296
*/
285
297
public String getProxyHost () {
@@ -288,17 +300,16 @@ public String getProxyHost() {
288
300
289
301
/**
290
302
* 设置代理服务器主机地址。
291
- *
292
- * @param proxyHost
293
- * 代理服务器主机地址。
303
+ *
304
+ * @param proxyHost 代理服务器主机地址。
294
305
*/
295
306
public void setProxyHost (String proxyHost ) {
296
307
this .proxyHost = proxyHost ;
297
308
}
298
309
299
310
/**
300
311
* 返回代理服务器端口。
301
- *
312
+ *
302
313
* @return 代理服务器端口。
303
314
*/
304
315
public int getProxyPort () {
@@ -307,17 +318,16 @@ public int getProxyPort() {
307
318
308
319
/**
309
320
* 设置代理服务器端口。
310
- *
311
- * @param proxyPort
312
- * 代理服务器端口。
321
+ *
322
+ * @param proxyPort 代理服务器端口。
313
323
*/
314
324
public void setProxyPort (int proxyPort ) {
315
325
this .proxyPort = proxyPort ;
316
326
}
317
327
318
328
/**
319
329
* 返回代理服务器验证的用户名。
320
- *
330
+ *
321
331
* @return 用户名。
322
332
*/
323
333
public String getProxyUsername () {
@@ -326,17 +336,16 @@ public String getProxyUsername() {
326
336
327
337
/**
328
338
* 设置代理服务器验证的用户名。
329
- *
330
- * @param proxyUsername
331
- * 用户名。
339
+ *
340
+ * @param proxyUsername 用户名。
332
341
*/
333
342
public void setProxyUsername (String proxyUsername ) {
334
343
this .proxyUsername = proxyUsername ;
335
344
}
336
345
337
346
/**
338
347
* 返回代理服务器验证的密码。
339
- *
348
+ *
340
349
* @return 密码。
341
350
*/
342
351
public String getProxyPassword () {
@@ -345,17 +354,16 @@ public String getProxyPassword() {
345
354
346
355
/**
347
356
* 设置代理服务器验证的密码。
348
- *
349
- * @param proxyPassword
350
- * 密码。
357
+ *
358
+ * @param proxyPassword 密码。
351
359
*/
352
360
public void setProxyPassword (String proxyPassword ) {
353
361
this .proxyPassword = proxyPassword ;
354
362
}
355
363
356
364
/**
357
365
* 返回访问NTLM验证的代理服务器的Windows域名(可选)。
358
- *
366
+ *
359
367
* @return 域名。
360
368
*/
361
369
public String getProxyDomain () {
@@ -364,17 +372,16 @@ public String getProxyDomain() {
364
372
365
373
/**
366
374
* 设置访问NTLM验证的代理服务器的Windows域名(可选)。
367
- *
368
- * @param proxyDomain
369
- * 域名。
375
+ *
376
+ * @param proxyDomain 域名。
370
377
*/
371
378
public void setProxyDomain (String proxyDomain ) {
372
379
this .proxyDomain = proxyDomain ;
373
380
}
374
381
375
382
/**
376
383
* 返回NTLM代理服务器的Windows工作站名称。
377
- *
384
+ *
378
385
* @return NTLM代理服务器的Windows工作站名称。
379
386
*/
380
387
public String getProxyWorkstation () {
@@ -383,16 +390,16 @@ public String getProxyWorkstation() {
383
390
384
391
/**
385
392
* 设置NTLM代理服务器的Windows工作站名称。 (可选,如果代理服务器非NTLM,不需要设置该参数)。
386
- *
387
- * @param proxyWorkstation
388
- * NTLM代理服务器的Windows工作站名称。
393
+ *
394
+ * @param proxyWorkstation NTLM代理服务器的Windows工作站名称。
389
395
*/
390
396
public void setProxyWorkstation (String proxyWorkstation ) {
391
397
this .proxyWorkstation = proxyWorkstation ;
392
398
}
393
399
394
400
/**
395
401
* 获取同步Client内等待异步调用返回的最大超时时间。
402
+ *
396
403
* @return
397
404
*/
398
405
public long getSyncClientWaitFutureTimeoutInMillis () {
@@ -401,6 +408,7 @@ public long getSyncClientWaitFutureTimeoutInMillis() {
401
408
402
409
/**
403
410
* 设置同步Client内等待异步调用返回的最大超时时间。
411
+ *
404
412
* @param syncClientWaitFutureTimeoutInMillis
405
413
*/
406
414
public void setSyncClientWaitFutureTimeoutInMillis (long syncClientWaitFutureTimeoutInMillis ) {
@@ -409,6 +417,7 @@ public void setSyncClientWaitFutureTimeoutInMillis(long syncClientWaitFutureTime
409
417
410
418
/**
411
419
* 获取时序Client的配置。
420
+ *
412
421
* @return
413
422
*/
414
423
public TimeseriesConfiguration getTimeseriesConfiguration () {
@@ -417,6 +426,7 @@ public TimeseriesConfiguration getTimeseriesConfiguration() {
417
426
418
427
/**
419
428
* 设置时序Client的配置。
429
+ *
420
430
* @param timeseriesConfiguration
421
431
*/
422
432
public void setTimeseriesConfiguration (TimeseriesConfiguration timeseriesConfiguration ) {
@@ -429,9 +439,45 @@ public int getConnectionRequestTimeoutInMillisecond() {
429
439
430
440
/**
431
441
* 设置HttpAsyncClient的ConnectionRequestTimeout配置。
442
+ *
432
443
* @param connectionRequestTimeoutInMillisecond
433
444
*/
434
445
public void setConnectionRequestTimeoutInMillisecond (int connectionRequestTimeoutInMillisecond ) {
435
446
this .connectionRequestTimeoutInMillisecond = connectionRequestTimeoutInMillisecond ;
436
447
}
448
+
449
+ /**
450
+ * 获取链路追踪系统开启状态。
451
+ */
452
+ public boolean isEnableRequestTracer () {
453
+ return enableRequestTracer ;
454
+ }
455
+
456
+ /**
457
+ * 设置链路链路追踪系统是否开启
458
+ *
459
+ * @param enableRequestTracer
460
+ */
461
+ public void setEnableRequestTracer (boolean enableRequestTracer ) {
462
+ this .enableRequestTracer = enableRequestTracer ;
463
+ }
464
+
465
+
466
+ /**
467
+ * 设置接入链路追踪系统接口
468
+ *
469
+ * @param requestTracer 链路追踪系统接口
470
+ */
471
+ public void setRequestTracer (RequestTracer requestTracer ) {
472
+ this .requestTracer = requestTracer ;
473
+ }
474
+
475
+ /**
476
+ * 获取链路追踪系统接口
477
+ *
478
+ * @return 链路追踪系统接口实现
479
+ */
480
+ public RequestTracer getRequestTracer () {
481
+ return requestTracer ;
482
+ }
437
483
}
0 commit comments