Contains driver tuning policies to determine load balancing, retrying queries, reconnecting to a node, address resolution, timestamp generation and speculative execution.

Modules

Functions

policies.defaultAddressTranslator

()

Returns a new instance of the default address translator policy used by the driver.

Static
This function is static
Returns:
Type Description
AddressTranslator

policies.defaultLoadBalancingPolicy

([string localDc])

Returns a new instance of the default load-balancing policy used by the driver.

Static
This function is static
Parameters:
Name Type Description
localDc optional string

When provided, it sets the data center that is going to be used as local for the load-balancing policy instance.

When localDc is undefined, the load-balancing policy instance will use the localDataCenter provided in the ClientOptions.

Returns:
Type Description
LoadBalancingPolicy

policies.defaultReconnectionPolicy

()

Returns a new instance of the default reconnection policy used by the driver.

Static
This function is static
Returns:
Type Description
ReconnectionPolicy

policies.defaultRetryPolicy

()

Returns a new instance of the default retry policy used by the driver.

Static
This function is static
Returns:
Type Description
RetryPolicy

policies.defaultSpeculativeExecutionPolicy

()

Returns a new instance of the default speculative execution policy used by the driver.

Static
This function is static
Returns:
Type Description
SpeculativeExecutionPolicy

policies.defaultTimestampGenerator

()

Returns a new instance of the default timestamp generator used by the driver.

Static
This function is static
Returns:
Type Description
TimestampGenerator