final case class BasicConfig(contactPoints: List[String] = BasicConfig.Default.contactPoints, sessionName: Option[String] = BasicConfig.Default.sessionName, sessionKeyspace: Option[String] = BasicConfig.Default.sessionKeyspace, configReloadInterval: Duration = BasicConfig.Default.configReloadInterval, request: BasicRequestConfig = BasicConfig.Default.request, loadBalancingPolicy: LoadBalancingPolicyConfig = BasicConfig.Default.loadBalancingPolicy) extends Product with Serializable

Basic datastax driver configuration.

contactPoints

The contact points to use for the initial connection to the cluster. These are addresses of Cassandra nodes that the driver uses to discover the cluster topology. Only one contact point is required (the driver will retrieve the address of the other nodes automatically), but it is usually a good idea to provide more than one contact point, because if that single contact point is unavailable, the driver cannot initialize itself correctly. This must be a list of strings with each contact point specified as "host:port". If the host is a DNS name that resolves to multiple A-records, all the corresponding addresses will be used. Do not use "localhost" as the host name (since it resolves to both IPv4 and IPv6 addresses on some platforms). Note that Cassandra 3 and below requires all nodes in a cluster to share the same port (see CASSANDRA-7544).

sessionName

A name that uniquely identifies the driver instance created from this configuration. This is used as a prefix for log messages and metrics. If this option is absent, the driver will generate an identifier composed of the letter 's' followed by an incrementing counter. If you provide a different value, try to keep it short to keep the logs readable. Also, make sure it is unique: reusing the same value will not break the driver, but it will mix up the logs and metrics.

sessionKeyspace

The name of the keyspace that the session should initially be connected to. This expects the same format as in a CQL query: case-sensitive names must be quoted. If this option is absent, the session won't be connected to any keyspace, and you'll have to either qualify table names in your queries, or use the per-query keyspace feature available in Cassandra 4 and above (see com.datastax.oss.driver.api.core.session.Request.getKeyspace()).

request

This configures basic request properties such as timeout, page size etc.

loadBalancingPolicy

The policy that decides the "query plan" for each query; that is, which nodes to try as coordinators, and in which order. Overridable in a profile. Note that the driver creates as few instances as possible: if a named profile inherits from the default profile, or if two sibling profiles have the exact same configuration, they will share a single policy instance at runtime. If there are multiple load balancing policies in a single driver instance, they work together in the following way:

  • each request gets a query plan from its profile's policy (or the default policy if the request has no profile, or the profile does not override the policy).
  • when the policies assign distances to nodes, the driver uses the closest assigned distance for any given node.
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BasicConfig
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new BasicConfig(contactPoints: List[String] = BasicConfig.Default.contactPoints, sessionName: Option[String] = BasicConfig.Default.sessionName, sessionKeyspace: Option[String] = BasicConfig.Default.sessionKeyspace, configReloadInterval: Duration = BasicConfig.Default.configReloadInterval, request: BasicRequestConfig = BasicConfig.Default.request, loadBalancingPolicy: LoadBalancingPolicyConfig = BasicConfig.Default.loadBalancingPolicy)

    contactPoints

    The contact points to use for the initial connection to the cluster. These are addresses of Cassandra nodes that the driver uses to discover the cluster topology. Only one contact point is required (the driver will retrieve the address of the other nodes automatically), but it is usually a good idea to provide more than one contact point, because if that single contact point is unavailable, the driver cannot initialize itself correctly. This must be a list of strings with each contact point specified as "host:port". If the host is a DNS name that resolves to multiple A-records, all the corresponding addresses will be used. Do not use "localhost" as the host name (since it resolves to both IPv4 and IPv6 addresses on some platforms). Note that Cassandra 3 and below requires all nodes in a cluster to share the same port (see CASSANDRA-7544).

    sessionName

    A name that uniquely identifies the driver instance created from this configuration. This is used as a prefix for log messages and metrics. If this option is absent, the driver will generate an identifier composed of the letter 's' followed by an incrementing counter. If you provide a different value, try to keep it short to keep the logs readable. Also, make sure it is unique: reusing the same value will not break the driver, but it will mix up the logs and metrics.

    sessionKeyspace

    The name of the keyspace that the session should initially be connected to. This expects the same format as in a CQL query: case-sensitive names must be quoted. If this option is absent, the session won't be connected to any keyspace, and you'll have to either qualify table names in your queries, or use the per-query keyspace feature available in Cassandra 4 and above (see com.datastax.oss.driver.api.core.session.Request.getKeyspace()).

    request

    This configures basic request properties such as timeout, page size etc.

    loadBalancingPolicy

    The policy that decides the "query plan" for each query; that is, which nodes to try as coordinators, and in which order. Overridable in a profile. Note that the driver creates as few instances as possible: if a named profile inherits from the default profile, or if two sibling profiles have the exact same configuration, they will share a single policy instance at runtime. If there are multiple load balancing policies in a single driver instance, they work together in the following way:

    • each request gets a query plan from its profile's policy (or the default policy if the request has no profile, or the profile does not override the policy).
    • when the policies assign distances to nodes, the driver uses the closest assigned distance for any given node.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  6. val configReloadInterval: Duration
  7. val contactPoints: List[String]
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. val loadBalancingPolicy: LoadBalancingPolicyConfig
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  15. def productElementNames: Iterator[String]
    Definition Classes
    Product
  16. val request: BasicRequestConfig
  17. val sessionKeyspace: Option[String]
  18. val sessionName: Option[String]
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  21. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  22. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped