Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FMWK-297 Document driver configuration properties #61

Merged
merged 1 commit into from
Dec 20, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 30 additions & 17 deletions docs/params.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,38 @@ The Aerospike JDBC driver can be configured through the JDBC connection URL. For

`jdbc:aerospike:localhost/test?sendKey=true&durableDelete=true&expiration=-1`

The parameters need to match fields of the [Aerospike Java client's](https://javadoc.io/doc/com.aerospike/aerospike-client/latest/index.html)
`Policy`, `ClientPolicy`, `WritePolicy` classes, which take `int` or `boolean`
values.
For detailed information about configuration properties, see the following sections.

## Aerospike Java client configuration

## Parameters
The parameters need to match fields of the [Aerospike Java client's](https://javadoc.io/doc/com.aerospike/aerospike-client/latest/index.html)
`Policy` and its subclasses, which take `String`, `int` or `boolean` values.

The optional configuration parameters include the following

| Param | Default | Description | Aerospike Java Client |
|-------|---------|-------------|-----------------------|
| `useBoolBin` | `true` | Use the boolean data type | `Value.UseBoolBin` |
| `compress` | `false` | Use zlib compression on commands to the server | `Policy.compress` |
| `connectTimeout` | 0 | Socket connect timeout in milliseconds | `Policy.connectTimeout` |
| `loginTimeout` | 5000 | Login timeout in milliseconds | `ClientPolicy.loginTimeout` |
| `tendInterval` | 1000 | Interval in milliseconds between cluster tends | `ClientPolicy.tendInterval` |
| `timeout` | 1000 | Cluster tend info call timeout in milliseconds | `ClientPolicy.timeout` |
| `totalTimeout` | 0 | Total transaction timeout in milliseconds | `Policy.totalTimeout` |
| `useServicesAlternate` | `false` | Use "services-alternate" instead of "services" for cluster tending | `ClientPolicy.useServicesAlternate` |
| `sendKey` | `false` | Send user key on both reads and writes | `Policy.sendKey` |
| `durableDelete` | `false` | If the transaction results in a record deletion, leave a tombstone for the record | `Policy.durableDelete` |
| `expiration` | 0 | 0 : use namespace `default-ttl`; -1: never expire; -2 don't change the ttl; otherwise seconds till expiration | `Policy.expiration` |
| Param | Default | Description | Aerospike Java Client |
|----------------------|---------|---------------------------------------------------------------------------------------------------------------|-------------------------------------|
| useBoolBin | `true` | Use the boolean data type | `Value.UseBoolBin` |
| compress | `false` | Use zlib compression on commands to the server | `Policy.compress` |
| connectTimeout | 0 | Socket connect timeout in milliseconds | `Policy.connectTimeout` |
| loginTimeout | 5000 | Login timeout in milliseconds | `ClientPolicy.loginTimeout` |
| tendInterval | 1000 | Interval in milliseconds between cluster tends | `ClientPolicy.tendInterval` |
| timeout | 1000 | Cluster tend info call timeout in milliseconds | `ClientPolicy.timeout` |
| totalTimeout | 0 | Total transaction timeout in milliseconds | `Policy.totalTimeout` |
| useServicesAlternate | `false` | Use "services-alternate" instead of "services" for cluster tending | `ClientPolicy.useServicesAlternate` |
| sendKey | `false` | Send user key on both reads and writes | `Policy.sendKey` |
| durableDelete | `false` | If the transaction results in a record deletion, leave a tombstone for the record | `Policy.durableDelete` |
| expiration | 0 | 0 : use namespace `default-ttl`; -1: never expire; -2 don't change the ttl; otherwise seconds till expiration | `Policy.expiration` |

## JDBC Driver configuration

The following parameters configure the internal state of the driver.
Their default values are sufficient in most cases.
Consider setting a custom value if really necessary.

| Param | Default | Description |
|-------------------------|---------|------------------------------------------------------------------------|
| recordSetQueueCapacity | 256 | The capacity of the record queue for asynchronous Aerospike operations |
| recordSetTimeoutMs | 1000 | Timeout for the asynchronous queue write operation in milliseconds |
| metadataCacheTtlSeconds | 3600 | Database metadata cache TTL in seconds |
| schemaBuilderMaxRecords | 1000 | The number of records to be used to build the table schema |
Loading