public class PoolOptions extends Object
HttpClientPool
.Constructor and Description |
---|
PoolOptions()
Default constructor
|
PoolOptions(JsonObject json)
Constructor to create an options from JSON
|
PoolOptions(PoolOptions other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
int |
getCleanerPeriod() |
int |
getEventLoopSize() |
int |
getHttp1MaxSize()
Get the maximum pool size for HTTP/1.x connections
|
int |
getHttp2MaxSize()
Get the maximum pool size for HTTP/2 connections
|
int |
getMaxWaitQueueSize()
Returns the maximum wait queue size
|
PoolOptions |
setCleanerPeriod(int cleanerPeriod)
Set the connection pool cleaner period in milli seconds, a non positive value disables expiration checks and connections
will remain in the pool until they are closed.
|
PoolOptions |
setEventLoopSize(int eventLoopSize)
Set the number of event-loop the pool use.
|
PoolOptions |
setHttp1MaxSize(int http1MaxSize)
Set the maximum pool size for HTTP/1.x connections
|
PoolOptions |
setHttp2MaxSize(int max)
Set the maximum pool size for HTTP/2 connections
|
PoolOptions |
setMaxWaitQueueSize(int maxWaitQueueSize)
Set the maximum requests allowed in the wait queue, any requests beyond the max size will result in
a ConnectionPoolTooBusyException.
|
JsonObject |
toJson() |
public PoolOptions()
public PoolOptions(PoolOptions other)
other
- the options to copypublic PoolOptions(JsonObject json)
json
- the JSONpublic int getHttp1MaxSize()
public PoolOptions setHttp1MaxSize(int http1MaxSize)
http1MaxSize
- the maximum pool sizepublic int getHttp2MaxSize()
public PoolOptions setHttp2MaxSize(int max)
max
- the maximum pool sizepublic int getCleanerPeriod()
public PoolOptions setCleanerPeriod(int cleanerPeriod)
cleanerPeriod
- the pool cleaner periodpublic int getEventLoopSize()
0
which implies
to reuse the current event-looppublic PoolOptions setEventLoopSize(int eventLoopSize)
0
, the client pool will use the current event-loop0
.eventLoopSize
- the new sizepublic PoolOptions setMaxWaitQueueSize(int maxWaitQueueSize)
maxWaitQueueSize
- the maximum number of waiting requestspublic int getMaxWaitQueueSize()
public JsonObject toJson()
Copyright © 2024 Eclipse. All rights reserved.