@@ -109,6 +109,7 @@ public class DefaultAsyncHttpClientConfig implements AsyncHttpClientConfig {
109
109
110
110
// cookie store
111
111
private final CookieStore cookieStore ;
112
+ private final int expiredCookieEvictionDelay ;
112
113
113
114
// internals
114
115
private final String threadPoolName ;
@@ -192,6 +193,7 @@ private DefaultAsyncHttpClientConfig(// http
192
193
193
194
// cookie store
194
195
CookieStore cookieStore ,
196
+ int expiredCookieEvictionDelay ,
195
197
196
198
// tuning
197
199
boolean tcpNoDelay ,
@@ -283,6 +285,7 @@ private DefaultAsyncHttpClientConfig(// http
283
285
284
286
// cookie store
285
287
this .cookieStore = cookieStore ;
288
+ this .expiredCookieEvictionDelay = expiredCookieEvictionDelay ;
286
289
287
290
// tuning
288
291
this .tcpNoDelay = tcpNoDelay ;
@@ -558,6 +561,11 @@ public CookieStore getCookieStore() {
558
561
return cookieStore ;
559
562
}
560
563
564
+ @ Override
565
+ public int expiredCookieEvictionDelay () {
566
+ return expiredCookieEvictionDelay ;
567
+ }
568
+
561
569
// tuning
562
570
@ Override
563
571
public boolean isTcpNoDelay () {
@@ -746,6 +754,7 @@ public static class Builder {
746
754
747
755
// cookie store
748
756
private CookieStore cookieStore = new ThreadSafeCookieStore ();
757
+ private int expiredCookieEvictionDelay = defaultExpiredCookieEvictionDelay ();
749
758
750
759
// tuning
751
760
private boolean tcpNoDelay = defaultTcpNoDelay ();
@@ -1146,6 +1155,11 @@ public Builder setCookieStore(CookieStore cookieStore) {
1146
1155
return this ;
1147
1156
}
1148
1157
1158
+ public Builder setExpiredCookieEvictionDelay (int expiredCookieEvictionDelay ) {
1159
+ this .expiredCookieEvictionDelay = expiredCookieEvictionDelay ;
1160
+ return this ;
1161
+ }
1162
+
1149
1163
// tuning
1150
1164
public Builder setTcpNoDelay (boolean tcpNoDelay ) {
1151
1165
this .tcpNoDelay = tcpNoDelay ;
@@ -1330,6 +1344,7 @@ public DefaultAsyncHttpClientConfig build() {
1330
1344
responseFilters .isEmpty () ? Collections .emptyList () : Collections .unmodifiableList (responseFilters ),
1331
1345
ioExceptionFilters .isEmpty () ? Collections .emptyList () : Collections .unmodifiableList (ioExceptionFilters ),
1332
1346
cookieStore ,
1347
+ expiredCookieEvictionDelay ,
1333
1348
tcpNoDelay ,
1334
1349
soReuseAddress ,
1335
1350
soKeepAlive ,
0 commit comments