Emitted each time a connection is successfully checked into the connection pool
Emitted each time a connection is successfully checked out of the connection pool
Emitted when an attempt to check out a connection fails
Emitted when an attempt to check out a connection begins
Emitted when a connection is closed
Emitted when a connection is created.
Emitted each time the connection pool is cleared and it's generation incremented
Emitted once when the connection pool is closed
Emitted when the connection pool is created.
Emitted when a connection becomes established, and is ready to use
An integer representing the SDAM generation of the pool
An integer expressing how many total connections are permitted
Sets or gets the default captureRejection value for all emitters.
This symbol shall be used to install a listener for only monitoring 'error'
events. Listeners installed using this symbol are called before the regular
'error'
listeners are called.
Installing a listener using this symbol does not change the behavior once an
'error'
event is emitted, therefore the process will still crash if no
regular 'error'
listener is installed.
The address of the endpoint the pool is connected to
An integer expressing how many connections are currently available in the pool.
An integer representing the SDAM generation of the pool
An integer expressing how many total connections (active + in use) the pool currently has
Check a connection into the pool.
The connection to check in
Check a connection out of this pool. The connection will continue to be tracked, but no reference to it will be held by the pool. This means that if a connection is checked out it MUST be checked back in or explicitly destroyed by the new owner.
Clear the pool
Pool reset is handled by incrementing the pool's generation count. Any existing connection of a previous generation will eventually be pruned during subsequent checkouts.
Close the pool
Runs a lambda with an implicitly checked out connection, checking that connection back in when the lambda has completed by calling back.
NOTE: please note the required signature of fn
A function which operates on a managed connection
The original callback
Returns a list listener for a specific emitter event name.
Generated using TypeDoc
A pool of connections which dynamically resizes, and emit events related to pool activity