- Source:
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
minSize |
number |
<optional> |
0
|
The minimum number of objects the pool will try to maintain including borrowed objects. Cannot be greater than given maxSize. If this value is given without a maxSize, maxSize will be adjusted if needed |
maxSize |
number |
<optional> |
1
|
The maximum number of objects the pool can manage including objects being created. Cannot be less than given minSize. If this value is given without a minSize, minSize will be adjusted if needed |
defaultTimeoutInMs |
number | null |
<optional> |
30000
|
The default time in milliseconds calls to pool.acquire() and pool.use() will time out |
maxPendingRequests |
number | null |
<optional> |
null
|
The number of requests that can be queued if the pool is at maximum size and has no objects available.
ie. the max number of requests waiting for an object to be returned. Note: Setting maxPendingRequests to |
idleCheckIntervalInMs |
number | null |
<optional> |
null
|
The interval the pool checks for and removes idle objects |
maxIdleToRemove |
number | null |
<optional> |
null
|
The max objects that can be removed when the pool checks for idle objects |
softIdleTimeInMs |
number | null |
<optional> |
null
|
The amount of time an object must be idle before being eligible for soft removal. If an object is checked and exceeds this time it will be destroyed if the currently available objects is above the minimum |
hardIdleTimeInMs |
number | null |
<optional> |
30000
|
The amount of time an object must be idle before being eligible for hard removal. If an object is checked exceeding this idle time it will be destroyed. If destroying the object would bring the pool below the minimum, a new object will be created |
shouldAutoStart |
boolean |
<optional> |
true
|
If true, pool will start automatically. If a minSize is set the pool will start creating objects before any requests are made |
shouldValidateOnDispatch |
boolean |
<optional> |
false
|
If |
shouldValidateOnReturn |
boolean |
<optional> |
false
|
If |
shouldUseFifo |
boolean |
<optional> |
true
|
Determines the order objects are dispatched. Either First in, First out (FIFO) or Last in, First out (LIFO). By default,
the pool dispatches the object that has been available the longest, working like a queue (FIFO). Setting this option to |