Class QldbDriverBuilder
Builder object for creating a QldbDriver, allowing for configuration of the parameters of construction.
Inheritance
Inherited Members
Namespace: Amazon.QLDB.Driver
Assembly: Amazon.QLDB.Driver.dll
Syntax
public class QldbDriverBuilder
Methods
| Improve this Doc View SourceBuild()
Build a driver instance using the current configuration set with the builder.
Declaration
public QldbDriver Build()
Returns
Type | Description |
---|---|
QldbDriver | A newly created driver. |
WithAWSCredentials(AWSCredentials)
Specify the credentials that should be used for the driver's sessions.
Declaration
public QldbDriverBuilder WithAWSCredentials(AWSCredentials credentials)
Parameters
Type | Name | Description |
---|---|---|
Amazon.Runtime.AWSCredentials | credentials | The credentials to create a driver with. |
Returns
Type | Description |
---|---|
QldbDriverBuilder | This builder object. |
WithLedger(String)
Specify the ledger that should be used for the driver's sessions.
Declaration
public QldbDriverBuilder WithLedger(string ledgerName)
Parameters
Type | Name | Description |
---|---|---|
System.String | ledgerName | The name of the ledger to create a driver with. |
Returns
Type | Description |
---|---|
QldbDriverBuilder | This builder object. |
WithLogger(ILogger)
Specify the logger that should be used for the driver's sessions.
Declaration
public QldbDriverBuilder WithLogger(ILogger logger)
Parameters
Type | Name | Description |
---|---|---|
Microsoft.Extensions.Logging.ILogger | logger | The logger to create a driver with. |
Returns
Type | Description |
---|---|
QldbDriverBuilder | This builder object. |
WithMaxConcurrentTransactions(Int32)
Specify the maximum number of concurrent transactions the driver can handle.
Set to 0 by default to use the maximum possible amount allowed by the client builder's configuration.
Declaration
public QldbDriverBuilder WithMaxConcurrentTransactions(int maxConcurrentTransactions)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | maxConcurrentTransactions | The maximum number of transactions can be running at any one time. This amount cannot exceed the amount set in the Amazon.Runtime.ClientConfig used for this builder. |
Returns
Type | Description |
---|---|
QldbDriverBuilder | This builder object. |
WithQLDBSessionConfig(AmazonQLDBSessionConfig)
Specify the configuration that should be used for the driver's sessions.
Declaration
public QldbDriverBuilder WithQLDBSessionConfig(AmazonQLDBSessionConfig sessionConfig)
Parameters
Type | Name | Description |
---|---|---|
Amazon.QLDBSession.AmazonQLDBSessionConfig | sessionConfig | The configuration to create a driver with. |
Returns
Type | Description |
---|---|
QldbDriverBuilder | This builder object. |
WithRetryLogging()
Enable loggging driver retries at the WARN level.
Declaration
public QldbDriverBuilder WithRetryLogging()
Returns
Type | Description |
---|---|
QldbDriverBuilder | This builder object. |