public class PoolOptions extends Object
Constructor and Description |
---|
PoolOptions() |
PoolOptions(JsonObject json) |
PoolOptions(PoolOptions other) |
Modifier and Type | Method and Description |
---|---|
int |
getCleanerInterval()
Tune how often in milliseconds should the connection pool cleaner execute.
|
int |
getMaxSize()
Tune the maximum size of the connection pool.
|
int |
getMaxWaiting()
Tune the maximum waiting requests for a connection from the pool.
|
String |
getName()
Get the pool name to be used in this client.
|
int |
getRecycleTimeout()
Tune when a connection should be recycled in milliseconds.
|
PoolOptions |
setCleanerInterval(int cleanerInterval)
Tune how often in milliseconds should the connection pool cleaner execute.
|
PoolOptions |
setMaxSize(int maxSize)
Tune the maximum size of the connection pool.
|
PoolOptions |
setMaxWaiting(int maxWaiting)
Tune the maximum waiting requests for a connection from the pool.
|
PoolOptions |
setName(String name)
Set a user defined pool name (for metrics reporting).
|
PoolOptions |
setRecycleTimeout(int recycleTimeout)
Tune when a connection should be recycled in milliseconds.
|
JsonObject |
toJson()
Converts this object to JSON notation.
|
public PoolOptions()
public PoolOptions(PoolOptions other)
public PoolOptions(JsonObject json)
public PoolOptions setName(String name)
name
- the user desired pool name.public String getName()
public int getCleanerInterval()
public PoolOptions setCleanerInterval(int cleanerInterval)
cleanerInterval
- the interval in milliseconds (-1 for never)public int getMaxSize()
public PoolOptions setMaxSize(int maxSize)
maxSize
- the max pool size.public int getMaxWaiting()
public PoolOptions setMaxWaiting(int maxWaiting)
maxWaiting
- max waiting requestspublic int getRecycleTimeout()
public PoolOptions setRecycleTimeout(int recycleTimeout)
recycleTimeout
- the timeout for recycling.public JsonObject toJson()
Copyright © 2024 Eclipse. All rights reserved.