Advanced datastax driver configuration
- Value parameters:
- addressTranslator
The address translator to use to convert the addresses sent by Cassandra nodes into ones that the driver uses to connect. By default
com.datastax.oss.driver.internal.core.addresstranslation.PassThroughAddressTranslator
is used.- authProvider
if
None
no authentication will occur.- coalescer
The component that coalesces writes on the connections.
- connection
Configures query connection.
- controlConnection
Configures dedicated administrative connection.
- heartbeat
Heartbeat configuration to check if node is alive.
- metadata
Metadata about the Cassandra cluster.
- metrics
Metrics configuration. Disabled by default.
- netty
Netty configuration which is used internally by driver.
- nodeStateListener
A session-wide component that listens for node state changes. By default
com.datastax.oss.driver.internal.core.metadata.NoopNodeStateListener
is used.- preparedStatements
Prepared statements configuration.
- protocol
The native protocol to use which defines the format of the binary messages between driver and Cassandra.
- reconnectOnInit
Whether to schedule reconnection attempts if all contact points are unreachable on the first initialization attempt. If this is true, the driver will retry according to the reconnection policy. The
SessionBuilder.build()
call -- or the future returned bySessionBuilder.buildAsync()
-- won't complete until a contact point has been reached. If this is false and no contact points are available, the driver will fail.- reconnectionPolicy
The policy that controls how often the driver tries to re-establish connections to down nodes.
- request
Request configuration.
- requestTracker
A session-wide component that tracks the outcome of requests. By default
com.datastax.oss.driver.internal.core.trackerNoopRequestTracker
is used.- resolveContactPoints
Whether to resolve the addresses passed to
Basic.contactPoints
. If this is true, addresses are created withInetSocketAddress(String, int)
: the host name will be resolved the first time, and the driver will use the resolved IP address for all subsequent connection attempts. If this is false, addresses are created withInetSocketAddress.createUnresolved()
: the host name will be resolved again every time the driver opens a new connection. This is useful for containerized environments where DNS records are more likely to change over time (note that the JVM and OS have their own DNS caching mechanisms, so you might need additional configuration beyond the driver).- retryPolicy
The policy that controls if the driver retries requests that have failed on one node.
- schemaChangeListener
A session-wide component that listens for node state changes. By default
com.datastax.oss.driver.internal.core.metadata.schema.NoopSchemaChangeListener
is used.- socket
Socket configuration.
- speculativeExecutionPolicy
The policy that controls if the driver pre-emptively tries other nodes if a node takes too long to respond.
- throttler
A session-wide component that controls the rate at which requests are executed. By default
PassThroughRequestThrottler
is used.- timestampGenerator
The generator that assigns a microsecond timestamp to each request.
- Companion:
- object