@@ -79,8 +79,8 @@ public class AsyncHttpClientConfig {
79
79
private final boolean allowSslConnectionPool ;
80
80
private final boolean useRawUrl ;
81
81
private final boolean removeQueryParamOnRedirect ;
82
- private final int ioThreadMultiplier ;
83
82
private final HostnameVerifier hostnameVerifier ;
83
+ private final int ioThreadMultiplier ;
84
84
85
85
private AsyncHttpClientConfig (int maxTotalConnections ,
86
86
int maxConnectionPerHost ,
@@ -107,8 +107,8 @@ private AsyncHttpClientConfig(int maxTotalConnections,
107
107
boolean allowSslConnectionCaching ,
108
108
boolean useRawUrl ,
109
109
boolean removeQueryParamOnRedirect ,
110
- int ioThreadMultiplier ,
111
- HostnameVerifier hostnameVerifier ) {
110
+ HostnameVerifier hostnameVerifier ,
111
+ int ioThreadMultiplier ) {
112
112
113
113
this .maxTotalConnections = maxTotalConnections ;
114
114
this .maxConnectionPerHost = maxConnectionPerHost ;
@@ -133,8 +133,8 @@ private AsyncHttpClientConfig(int maxTotalConnections,
133
133
this .reaper = reaper ;
134
134
this .allowSslConnectionPool = allowSslConnectionCaching ;
135
135
this .removeQueryParamOnRedirect = removeQueryParamOnRedirect ;
136
- this .ioThreadMultiplier = ioThreadMultiplier ;
137
136
this .hostnameVerifier = hostnameVerifier ;
137
+ this .ioThreadMultiplier = ioThreadMultiplier ;
138
138
139
139
if (applicationThreadPool == null ) {
140
140
this .applicationThreadPool = Executors .newCachedThreadPool ();
@@ -414,14 +414,6 @@ public boolean isRemoveQueryParamOnRedirect() {
414
414
return removeQueryParamOnRedirect ;
415
415
}
416
416
417
- /***
418
- *
419
- * @return number to multiply by availableProcessors() that will determine # of NioWorkers to use
420
- */
421
- public int getIoThreadMultiplier () {
422
- return ioThreadMultiplier ;
423
- }
424
-
425
417
/**
426
418
* Return true if one of the {@link java.util.concurrent.ExecutorService} has been shutdown.
427
419
* @return true if one of the {@link java.util.concurrent.ExecutorService} has been shutdown.
@@ -438,6 +430,14 @@ public HostnameVerifier getHostnameVerifier() {
438
430
return hostnameVerifier ;
439
431
}
440
432
433
+ /***
434
+ *
435
+ * @return number to multiply by availableProcessors() that will determine # of NioWorkers to use
436
+ */
437
+ public int getIoThreadMultiplier () {
438
+ return ioThreadMultiplier ;
439
+ }
440
+
441
441
/**
442
442
* Builder for an {@link AsyncHttpClient}
443
443
*/
@@ -481,13 +481,13 @@ public Thread newThread(Runnable r) {
481
481
private boolean allowSslConnectionPool = true ;
482
482
private boolean useRawUrl = false ;
483
483
private boolean removeQueryParamOnRedirect = true ;
484
- private int ioThreadMultiplier = 2 ;
485
484
private HostnameVerifier hostnameVerifier = new HostnameVerifier () {
486
485
487
486
public boolean verify ( String s , SSLSession sslSession ) {
488
487
return true ;
489
488
}
490
489
};
490
+ private int ioThreadMultiplier = 2 ;
491
491
492
492
public Builder () {
493
493
}
@@ -877,11 +877,6 @@ public Builder setUseProxyProperties(boolean useProxyProperties) {
877
877
return this ;
878
878
}
879
879
880
- public Builder setIOThreadMultiplier (int multiplier ){
881
- this .ioThreadMultiplier = multiplier ;
882
- return this ;
883
- }
884
-
885
880
/**
886
881
* Set the {@link HostnameVerifier}
887
882
* @param hostnameVerifier {@link HostnameVerifier}
@@ -892,6 +887,11 @@ public Builder setHostnameVerifier(HostnameVerifier hostnameVerifier){
892
887
return this ;
893
888
}
894
889
890
+ public Builder setIOThreadMultiplier (int multiplier ){
891
+ this .ioThreadMultiplier = multiplier ;
892
+ return this ;
893
+ }
894
+
895
895
/**
896
896
* Create a config builder with values taken from the given prototype configuration.
897
897
*
@@ -964,8 +964,8 @@ public AsyncHttpClientConfig build() {
964
964
allowSslConnectionPool ,
965
965
useRawUrl ,
966
966
removeQueryParamOnRedirect ,
967
- ioThreadMultiplier ,
968
- hostnameVerifier );
967
+ hostnameVerifier ,
968
+ ioThreadMultiplier );
969
969
}
970
970
}
971
971
}
0 commit comments