Class PooledQldbDriver.PooledQldbDriverBuilder
Builder object for creating a PooledQldbDriver, allowing for configuration of the parameters of construction.
Inheritance
Inherited Members
Namespace: Amazon.QLDB.Driver
Assembly: Amazon.QLDB.Driver.dll
Syntax
public class PooledQldbDriverBuilder : BaseQldbDriverBuilder<PooledQldbDriver.PooledQldbDriverBuilder, PooledQldbDriver>
Methods
| Improve this Doc View SourceWithPoolLimit(Int32)
Specify the limit to the pool of available sessions.
Attempting to retrieve a session when the maximum number of sessions is already withdrawn will block until a session becomes available. Set to 0 by default to use the maximum possible amount allowed by the client builder's configuration.
Declaration
public PooledQldbDriver.PooledQldbDriverBuilder WithPoolLimit(int poolLimit)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | poolLimit | The maximum number of sessions that can be created from the pool at any one time. This amount
cannot exceed the amount set in the |
Returns
Type | Description |
---|---|
PooledQldbDriver.PooledQldbDriverBuilder | This builder object. |
WithTimeout(Int32)
Specify the timeout to wait for an available session to return to the pool in milliseconds.
Calling GetSession() will wait until the timeout before throwing an exception if an available session is still not returned to the pool.
Declaration
public PooledQldbDriver.PooledQldbDriverBuilder WithTimeout(int timeout)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | timeout | The maximum amount of time to wait, in milliseconds. |
Returns
Type | Description |
---|---|
PooledQldbDriver.PooledQldbDriverBuilder | This builder object. |